Mercurial > pidgin
diff libpurple/server.c @ 23380:8ea901db8e34
Mobile status are created as independant statuses, which cannot be the
'primary active status' (which is always an exclusive status) of a
presence. So we need to use purple_presence_is_status_primitive_active to
check if the mobile status is active or not. This should fix the bug
where auto-replies are sent to mobile users.
| author | Sadrul Habib Chowdhury <imadil@gmail.com> |
|---|---|
| date | Sat, 21 Jun 2008 06:56:35 +0000 |
| parents | 5e6392e93ce9 |
| children | 49850f7ca393 3da0957e7821 |
line wrap: on
line diff
--- a/libpurple/server.c Sat Jun 21 04:50:36 2008 +0000 +++ b/libpurple/server.c Sat Jun 21 06:56:35 2008 +0000 @@ -727,6 +727,7 @@ PurpleStatusPrimitive primitive; const gchar *auto_reply_pref; const char *away_msg = NULL; + gboolean mobile = FALSE; auto_reply_pref = purple_prefs_get_string("/purple/away/auto_reply"); @@ -734,9 +735,10 @@ status = purple_presence_get_active_status(presence); status_type = purple_status_get_type(status); primitive = purple_status_type_get_primitive(status_type); + mobile = purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE); if ((primitive == PURPLE_STATUS_AVAILABLE) || (primitive == PURPLE_STATUS_INVISIBLE) || - (primitive == PURPLE_STATUS_MOBILE) || + mobile || !strcmp(auto_reply_pref, "never") || (!purple_presence_is_idle(presence) && !strcmp(auto_reply_pref, "awayidle"))) {
