pidgin: b5d1237a: This technically doesn't matter due to b...
rekkanoryo at pidgin.im
rekkanoryo at pidgin.im
Sat Nov 29 13:25:34 EST 2008
-----------------------------------------------------------------
Revision: b5d1237ae4c4f0f1689014d6402bad1c1fbb9ea9
Ancestor: cf77baecd4d76b774c847354badb2e4b2e0164e7
Author: paul at aurich.com
Date: 2008-11-29T17:05:43
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/b5d1237ae4c4f0f1689014d6402bad1c1fbb9ea9
Modified files:
libpurple/protocols/jabber/buddy.c
ChangeLog:
This technically doesn't matter due to behavior elsewhere in the prpl, but
rearrange resource priority so that Extended Away and DND presences are
preferred over Unavailable and Unavailable is preferred over unknown presence.
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/buddy.c 2953a9caa125959837fb444f38242552731fdc6d
+++ libpurple/protocols/jabber/buddy.c 346d9c11bb092816ff7e414ad9297e342f9d40f4
@@ -115,14 +115,18 @@ JabberBuddyResource *jabber_buddy_find_r
break;
case JABBER_BUDDY_STATE_AWAY:
case JABBER_BUDDY_STATE_DND:
- case JABBER_BUDDY_STATE_UNAVAILABLE:
- /* This resource is away/dnd/unavailable. Prefer to one which is extended away or unknown. */
- if ((jbr->state == JABBER_BUDDY_STATE_XA) ||
+ /* This resource is away/dnd. Prefer to one which is extended away, unavailable, or unknown. */
+ if ((jbr->state == JABBER_BUDDY_STATE_XA) || (jbr->state == JABBER_BUDDY_STATE_UNAVAILABLE) ||
(jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
jbr = l->data;
break;
case JABBER_BUDDY_STATE_XA:
- /* This resource is extended away. That's better than unknown. */
+ /* This resource is extended away. That's better than unavailable or unknown. */
+ if ((jbr->state == JABBER_BUDDY_STATE_UNAVAILABLE) || (jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
+ jbr = l->data;
+ break;
+ case JABBER_BUDDY_STATE_UNAVAILABLE:
+ /* This resource is unavailable. That's better than unknown. */
if ((jbr->state == JABBER_BUDDY_STATE_UNKNOWN) || (jbr->state == JABBER_BUDDY_STATE_ERROR))
jbr = l->data;
break;
More information about the Commits
mailing list