Mercurial > pidgin.yaz
changeset 29160:7c543cbf52c0
jabber: Fix removing a self-contact.
Need to check for subscription="remove" before checking if it's a self-contact.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Thu, 10 Dec 2009 03:15:26 +0000 |
parents | e111f3a2f664 |
children | 166e0fc6bd8e |
files | libpurple/protocols/jabber/roster.c |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/roster.c Wed Dec 09 06:16:53 2009 +0000 +++ b/libpurple/protocols/jabber/roster.c Thu Dec 10 03:15:26 2009 +0000 @@ -223,18 +223,18 @@ continue; if(subscription) { - if (jb == js->user_jb) + if (g_str_equal(subscription, "remove")) + jb->subscription = JABBER_SUB_REMOVE; + else if (jb == js->user_jb) jb->subscription = JABBER_SUB_BOTH; - else if(!strcmp(subscription, "none")) + else if (g_str_equal(subscription, "none")) jb->subscription = JABBER_SUB_NONE; - else if(!strcmp(subscription, "to")) + else if (g_str_equal(subscription, "to")) jb->subscription = JABBER_SUB_TO; - else if(!strcmp(subscription, "from")) + else if (g_str_equal(subscription, "from")) jb->subscription = JABBER_SUB_FROM; - else if(!strcmp(subscription, "both")) + else if (g_str_equal(subscription, "both")) jb->subscription = JABBER_SUB_BOTH; - else if(!strcmp(subscription, "remove")) - jb->subscription = JABBER_SUB_REMOVE; } if(purple_strequal(ask, "subscribe"))