Mercurial > pidgin
comparison 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 |
comparison
equal
deleted
inserted
replaced
23379:bd542a092a3b | 23380:8ea901db8e34 |
---|---|
725 PurpleStatus *status; | 725 PurpleStatus *status; |
726 PurpleStatusType *status_type; | 726 PurpleStatusType *status_type; |
727 PurpleStatusPrimitive primitive; | 727 PurpleStatusPrimitive primitive; |
728 const gchar *auto_reply_pref; | 728 const gchar *auto_reply_pref; |
729 const char *away_msg = NULL; | 729 const char *away_msg = NULL; |
730 gboolean mobile = FALSE; | |
730 | 731 |
731 auto_reply_pref = purple_prefs_get_string("/purple/away/auto_reply"); | 732 auto_reply_pref = purple_prefs_get_string("/purple/away/auto_reply"); |
732 | 733 |
733 presence = purple_account_get_presence(account); | 734 presence = purple_account_get_presence(account); |
734 status = purple_presence_get_active_status(presence); | 735 status = purple_presence_get_active_status(presence); |
735 status_type = purple_status_get_type(status); | 736 status_type = purple_status_get_type(status); |
736 primitive = purple_status_type_get_primitive(status_type); | 737 primitive = purple_status_type_get_primitive(status_type); |
738 mobile = purple_presence_is_status_primitive_active(presence, PURPLE_STATUS_MOBILE); | |
737 if ((primitive == PURPLE_STATUS_AVAILABLE) || | 739 if ((primitive == PURPLE_STATUS_AVAILABLE) || |
738 (primitive == PURPLE_STATUS_INVISIBLE) || | 740 (primitive == PURPLE_STATUS_INVISIBLE) || |
739 (primitive == PURPLE_STATUS_MOBILE) || | 741 mobile || |
740 !strcmp(auto_reply_pref, "never") || | 742 !strcmp(auto_reply_pref, "never") || |
741 (!purple_presence_is_idle(presence) && !strcmp(auto_reply_pref, "awayidle"))) | 743 (!purple_presence_is_idle(presence) && !strcmp(auto_reply_pref, "awayidle"))) |
742 { | 744 { |
743 g_free(name); | 745 g_free(name); |
744 return; | 746 return; |