Sat, 06 Jun 2009 22:38:15 +0000
Use jabber_is_own_account and perform way fewer normalizations per iteration
| 7014 | 1 | /* |
| 15884 | 2 | * purple - Jabber Protocol Plugin |
| 7014 | 3 | * |
| 4 | * Copyright (C) 2003, Nathan Walp <faceprint@faceprint.com> | |
| 5 | * | |
| 6 | * This program is free software; you can redistribute it and/or modify | |
| 7 | * it under the terms of the GNU General Public License as published by | |
| 8 | * the Free Software Foundation; either version 2 of the License, or | |
| 9 | * (at your option) any later version. | |
| 10 | * | |
| 11 | * This program is distributed in the hope that it will be useful, | |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 14 | * GNU General Public License for more details. | |
| 15 | * | |
| 16 | * You should have received a copy of the GNU General Public License | |
| 17 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19630
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 7014 | 19 | * |
| 20 | */ | |
| 21 | #include "internal.h" | |
| 22 | #include "debug.h" | |
| 23 | #include "server.h" | |
| 13809 | 24 | #include "util.h" |
| 7014 | 25 | |
| 26 | #include "buddy.h" | |
| 15265 | 27 | #include "google.h" |
| 7014 | 28 | #include "presence.h" |
| 29 | #include "roster.h" | |
| 30 | #include "iq.h" | |
| 31 | ||
| 32 | #include <string.h> | |
| 33 | ||
| 34 | void jabber_roster_request(JabberStream *js) | |
| 35 | { | |
| 36 | JabberIq *iq; | |
| 37 | ||
| 38 | iq = jabber_iq_new_query(js, JABBER_IQ_GET, "jabber:iq:roster"); | |
| 39 | ||
| 40 | jabber_iq_send(iq); | |
| 41 | } | |
| 42 | ||
| 15884 | 43 | static void remove_purple_buddies(JabberStream *js, const char *jid) |
| 7014 | 44 | { |
| 45 | GSList *buddies, *l; | |
| 46 | ||
| 15884 | 47 | buddies = purple_find_buddies(js->gc->account, jid); |
| 7014 | 48 | |
| 49 | for(l = buddies; l; l = l->next) | |
| 15884 | 50 | purple_blist_remove_buddy(l->data); |
| 7014 | 51 | |
| 52 | g_slist_free(buddies); | |
| 53 | } | |
| 54 | ||
| 15884 | 55 | static void add_purple_buddies_to_groups(JabberStream *js, const char *jid, |
| 7014 | 56 | const char *alias, GSList *groups) |
| 57 | { | |
| 58 | GSList *buddies, *g2, *l; | |
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
59 | gchar *my_bare_jid; |
|
19630
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
60 | GList *pool = NULL; |
| 7014 | 61 | |
| 15884 | 62 | buddies = purple_find_buddies(js->gc->account, jid); |
| 7014 | 63 | |
| 64 | g2 = groups; | |
| 65 | ||
| 66 | if(!groups) { | |
| 67 | if(!buddies) | |
| 68 | g2 = g_slist_append(g2, g_strdup(_("Buddies"))); | |
|
20221
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
69 | else { |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
70 | g_slist_free(buddies); |
| 7014 | 71 | return; |
|
20221
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
72 | } |
| 7014 | 73 | } |
| 74 | ||
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
75 | my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
76 | |
| 7014 | 77 | while(buddies) { |
| 15884 | 78 | PurpleBuddy *b = buddies->data; |
| 79 | PurpleGroup *g = purple_buddy_get_group(b); | |
| 7014 | 80 | |
| 81 | buddies = g_slist_remove(buddies, b); | |
| 82 | ||
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
83 | if((l = g_slist_find_custom(g2, purple_group_get_name(g), (GCompareFunc)strcmp))) { |
|
24950
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
84 | const char *servernick, *balias; |
| 7955 | 85 | |
|
24199
8606cb4e94f5
The alias we retrieve from the roster is a private alias; use purple_serv_got_private_alias() to tell the core about it
Evan Schoenberg <evands@pidgin.im>
parents:
23975
diff
changeset
|
86 | /* Previously stored serverside / buddy-supplied alias */ |
| 15884 | 87 | if((servernick = purple_blist_node_get_string((PurpleBlistNode*)b, "servernick"))) |
| 7955 | 88 | serv_got_alias(js->gc, jid, servernick); |
| 89 | ||
|
24199
8606cb4e94f5
The alias we retrieve from the roster is a private alias; use purple_serv_got_private_alias() to tell the core about it
Evan Schoenberg <evands@pidgin.im>
parents:
23975
diff
changeset
|
90 | /* Alias from our roster retrieval */ |
|
24950
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
91 | balias = purple_buddy_get_local_buddy_alias(b); |
|
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
92 | if(alias && (!balias || strcmp(balias, alias))) |
|
24199
8606cb4e94f5
The alias we retrieve from the roster is a private alias; use purple_serv_got_private_alias() to tell the core about it
Evan Schoenberg <evands@pidgin.im>
parents:
23975
diff
changeset
|
93 | purple_serv_got_private_alias(js->gc, jid, alias); |
| 7014 | 94 | g_free(l->data); |
| 95 | g2 = g_slist_delete_link(g2, l); | |
| 96 | } else { | |
|
19630
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
97 | pool = g_list_prepend(pool, b); |
| 7014 | 98 | } |
| 99 | } | |
| 100 | ||
| 101 | while(g2) { | |
| 15884 | 102 | PurpleGroup *g = purple_find_group(g2->data); |
|
19630
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
103 | PurpleBuddy *b = NULL; |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
104 | |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
105 | if (pool) { |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
106 | b = pool->data; |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
107 | pool = g_list_delete_link(pool, pool); |
|
26042
4dabdb5fe213
Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24983
diff
changeset
|
108 | } else { |
|
19630
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
109 | b = purple_buddy_new(js->gc->account, jid, alias); |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
110 | } |
| 7014 | 111 | |
| 112 | if(!g) { | |
| 15884 | 113 | g = purple_group_new(g2->data); |
| 114 | purple_blist_add_group(g, NULL); | |
| 7014 | 115 | } |
| 116 | ||
| 15884 | 117 | purple_blist_add_buddy(b, NULL, g, NULL); |
| 118 | purple_blist_alias_buddy(b, alias); | |
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
119 | |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
120 | /* If we just learned about ourself, then fake our status, |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
121 | * because we won't be receiving a normal presence message |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
122 | * about ourself. */ |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
123 | if(!strcmp(purple_buddy_get_name(b), my_bare_jid)) { |
| 15884 | 124 | PurplePresence *gpresence; |
| 125 | PurpleStatus *status; | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
126 | PurpleAccount *account; |
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
127 | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
128 | account = purple_connection_get_account(js->gc); |
|
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
129 | gpresence = purple_account_get_presence(account); |
| 15884 | 130 | status = purple_presence_get_active_status(gpresence); |
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
131 | jabber_presence_fake_to_self(js, status); |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
132 | } |
|
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
133 | |
| 7014 | 134 | g_free(g2->data); |
| 135 | g2 = g_slist_delete_link(g2, g2); | |
| 136 | } | |
| 137 | ||
|
19630
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
138 | while (pool) { |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
139 | PurpleBuddy *b = pool->data; |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
140 | purple_blist_remove_buddy(b); |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
141 | pool = g_list_delete_link(pool, pool); |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
142 | } |
|
7e24a9784ce8
Update the buddylist if a buddy is moved to another group from a different
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18196
diff
changeset
|
143 | |
|
13987
b5b1db6007b0
[gaim-migrate @ 16442]
Mark Doliner <markdoliner@pidgin.im>
parents:
13809
diff
changeset
|
144 | g_free(my_bare_jid); |
| 7014 | 145 | g_slist_free(buddies); |
| 146 | } | |
| 147 | ||
|
25817
09d6a40a341d
Pass IQ handlers type, from, id, and the child node
Paul Aurich <darkrain42@pidgin.im>
parents:
24672
diff
changeset
|
148 | void jabber_roster_parse(JabberStream *js, const char *from, |
|
09d6a40a341d
Pass IQ handlers type, from, id, and the child node
Paul Aurich <darkrain42@pidgin.im>
parents:
24672
diff
changeset
|
149 | JabberIqType type, const char *id, xmlnode *query) |
| 7014 | 150 | { |
|
25817
09d6a40a341d
Pass IQ handlers type, from, id, and the child node
Paul Aurich <darkrain42@pidgin.im>
parents:
24672
diff
changeset
|
151 | xmlnode *item, *group; |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
152 | gchar *own_jid; |
| 7445 | 153 | |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
154 | if (!jabber_is_own_account(js, from)) { |
|
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
155 | purple_debug_warning("jabber", "Received bogon roster push from %s\n", |
|
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
156 | from); |
|
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
157 | return; |
| 7175 | 158 | } |
| 159 | ||
|
23975
8ee397f04ca9
We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents:
23961
diff
changeset
|
160 | js->currently_parsing_roster_push = TRUE; |
|
23961
0a9e9676f7b5
Hopefully fix the XMPP contact flipping/swapping between groups bug
Mark Doliner <markdoliner@pidgin.im>
parents:
23566
diff
changeset
|
161 | |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
162 | own_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); |
|
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
163 | |
| 8135 | 164 | for(item = xmlnode_get_child(query, "item"); item; item = xmlnode_get_next_twin(item)) |
| 7014 | 165 | { |
| 166 | const char *jid, *name, *subscription, *ask; | |
| 167 | JabberBuddy *jb; | |
| 168 | ||
| 169 | subscription = xmlnode_get_attrib(item, "subscription"); | |
| 170 | jid = xmlnode_get_attrib(item, "jid"); | |
| 171 | name = xmlnode_get_attrib(item, "name"); | |
| 172 | ask = xmlnode_get_attrib(item, "ask"); | |
| 173 | ||
| 8347 | 174 | if(!jid) |
| 175 | continue; | |
| 176 | ||
| 177 | if(!(jb = jabber_buddy_find(js, jid, TRUE))) | |
| 178 | continue; | |
| 7014 | 179 | |
| 10289 | 180 | if(subscription) { |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
181 | gboolean me = FALSE; |
| 12285 | 182 | |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
183 | me = g_str_equal(own_jid, jabber_normalize(js->gc->account, jid)); |
| 12285 | 184 | |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
185 | if(me) |
| 12285 | 186 | jb->subscription = JABBER_SUB_BOTH; |
| 187 | else if(!strcmp(subscription, "none")) | |
| 188 | jb->subscription = JABBER_SUB_NONE; | |
| 189 | else if(!strcmp(subscription, "to")) | |
| 10289 | 190 | jb->subscription = JABBER_SUB_TO; |
| 191 | else if(!strcmp(subscription, "from")) | |
| 192 | jb->subscription = JABBER_SUB_FROM; | |
| 193 | else if(!strcmp(subscription, "both")) | |
| 194 | jb->subscription = JABBER_SUB_BOTH; | |
| 195 | else if(!strcmp(subscription, "remove")) | |
| 196 | jb->subscription = JABBER_SUB_REMOVE; | |
| 10941 | 197 | /* XXX: if subscription is now "from" or "none" we need to |
| 198 | * fake a signoff, since we won't get any presence from them | |
| 199 | * anymore */ | |
| 12285 | 200 | /* YYY: I was going to use this, but I'm not sure it's necessary |
| 201 | * anymore, but it's here in case it is. */ | |
| 202 | /* | |
| 203 | if ((jb->subscription & JABBER_SUB_FROM) || | |
| 204 | (jb->subscription & JABBER_SUB_NONE)) { | |
| 15884 | 205 | purple_prpl_got_user_status(js->gc->account, jid, "offline", NULL); |
| 12285 | 206 | } |
| 207 | */ | |
| 10289 | 208 | } |
| 7014 | 209 | |
| 210 | if(ask && !strcmp(ask, "subscribe")) | |
| 211 | jb->subscription |= JABBER_SUB_PENDING; | |
| 212 | else | |
| 213 | jb->subscription &= ~JABBER_SUB_PENDING; | |
| 214 | ||
| 8194 | 215 | if(jb->subscription == JABBER_SUB_REMOVE) { |
| 15884 | 216 | remove_purple_buddies(js, jid); |
| 7014 | 217 | } else { |
| 218 | GSList *groups = NULL; | |
|
20221
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
219 | |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
220 | if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
221 | if (!jabber_google_roster_incoming(js, item)) |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
222 | continue; |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
223 | |
| 8135 | 224 | for(group = xmlnode_get_child(item, "group"); group; group = xmlnode_get_next_twin(group)) { |
| 7316 | 225 | char *group_name; |
| 226 | ||
| 227 | if(!(group_name = xmlnode_get_data(group))) | |
| 228 | group_name = g_strdup(""); | |
| 13809 | 229 | |
| 15884 | 230 | if (g_slist_find_custom(groups, group_name, (GCompareFunc)purple_utf8_strcasecmp) == NULL) |
| 13809 | 231 | groups = g_slist_append(groups, group_name); |
|
20221
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
232 | else |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
233 | g_free(group_name); |
| 7014 | 234 | } |
| 15884 | 235 | add_purple_buddies_to_groups(js, jid, name, groups); |
| 7014 | 236 | } |
| 237 | } | |
|
18196
a7992a42dc3d
fix inital presence (fixes #1395)
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
238 | |
|
27275
a7836fbdcfa2
Use jabber_is_own_account and perform way fewer normalizations per iteration
Paul Aurich <darkrain42@pidgin.im>
parents:
27242
diff
changeset
|
239 | g_free(own_jid); |
|
23975
8ee397f04ca9
We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents:
23961
diff
changeset
|
240 | js->currently_parsing_roster_push = FALSE; |
|
23961
0a9e9676f7b5
Hopefully fix the XMPP contact flipping/swapping between groups bug
Mark Doliner <markdoliner@pidgin.im>
parents:
23566
diff
changeset
|
241 | |
|
18196
a7992a42dc3d
fix inital presence (fixes #1395)
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
242 | /* if we're just now parsing the roster for the first time, |
|
25799
f2b56ff62042
Wait until receiving the roster to tell the core we're logged in
Paul Aurich <darkrain42@pidgin.im>
parents:
24717
diff
changeset
|
243 | * then now would be the time to declare ourselves connected and |
|
f2b56ff62042
Wait until receiving the roster to tell the core we're logged in
Paul Aurich <darkrain42@pidgin.im>
parents:
24717
diff
changeset
|
244 | * send our initial presence */ |
|
18196
a7992a42dc3d
fix inital presence (fixes #1395)
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
245 | if(!js->roster_parsed) { |
|
a7992a42dc3d
fix inital presence (fixes #1395)
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
246 | js->roster_parsed = TRUE; |
|
25800
649ac8f00e04
Send initial presence before declaring us connected (I like this a little better)
Paul Aurich <darkrain42@pidgin.im>
parents:
25799
diff
changeset
|
247 | jabber_presence_send(js, TRUE); |
|
25799
f2b56ff62042
Wait until receiving the roster to tell the core we're logged in
Paul Aurich <darkrain42@pidgin.im>
parents:
24717
diff
changeset
|
248 | jabber_stream_set_state(js, JABBER_STREAM_CONNECTED); |
|
18196
a7992a42dc3d
fix inital presence (fixes #1395)
Nathan Walp <nwalp@pidgin.im>
parents:
15884
diff
changeset
|
249 | } |
| 7014 | 250 | } |
| 251 | ||
| 252 | static void jabber_roster_update(JabberStream *js, const char *name, | |
| 253 | GSList *grps) | |
| 254 | { | |
| 15884 | 255 | PurpleBuddy *b; |
| 256 | PurpleGroup *g; | |
| 7014 | 257 | GSList *groups = NULL, *l; |
| 258 | JabberIq *iq; | |
| 259 | xmlnode *query, *item, *group; | |
|
24950
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
260 | const char *balias; |
| 7014 | 261 | |
|
23975
8ee397f04ca9
We talked about this and decided it was probably cleaner to not use
Mark Doliner <markdoliner@pidgin.im>
parents:
23961
diff
changeset
|
262 | if (js->currently_parsing_roster_push) |
|
23961
0a9e9676f7b5
Hopefully fix the XMPP contact flipping/swapping between groups bug
Mark Doliner <markdoliner@pidgin.im>
parents:
23566
diff
changeset
|
263 | return; |
|
0a9e9676f7b5
Hopefully fix the XMPP contact flipping/swapping between groups bug
Mark Doliner <markdoliner@pidgin.im>
parents:
23566
diff
changeset
|
264 | |
|
20221
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
265 | if(!(b = purple_find_buddy(js->gc->account, name))) |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
266 | return; |
|
28e31ee832cd
applied changes from e56db1b8a7bb8729e30fb3bf99a94ff7887fe4ec
Luke Schierer <lschiere@pidgin.im>
parents:
19859
diff
changeset
|
267 | |
| 7014 | 268 | if(grps) { |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
269 | GString *out = g_string_new(NULL); |
| 7014 | 270 | groups = grps; |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
271 | |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
272 | for (l = groups; l; l = l->next) { |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
273 | out = g_string_append(out, (const char *)l->data); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
274 | if (l->next) |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
275 | out = g_string_append(out, ", "); |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
276 | } |
|
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
277 | |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
278 | purple_debug_info("jabber", "jabber_roster_update(%s): [Source: grps]: groups: %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
279 | name, out->str); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
280 | g_string_free(out, TRUE); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
281 | |
| 7014 | 282 | } else { |
| 15884 | 283 | GSList *buddies = purple_find_buddies(js->gc->account, name); |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
284 | GString *out = g_string_new(NULL); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
285 | |
| 7014 | 286 | if(!buddies) |
| 287 | return; | |
| 288 | while(buddies) { | |
| 289 | b = buddies->data; | |
| 15884 | 290 | g = purple_buddy_get_group(b); |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
291 | groups = g_slist_append(groups, (char *)purple_group_get_name(g)); |
| 7014 | 292 | buddies = g_slist_remove(buddies, b); |
| 293 | } | |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
294 | for (l = groups; l; l = l->next) { |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
295 | out = g_string_append(out, (const char *)l->data); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
296 | if (l->next) |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
297 | out = g_string_append(out, ", "); |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
298 | } |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
299 | |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
300 | purple_debug_info("jabber", "jabber_roster_update(%s): [Source: local blist]: groups: %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
301 | name, out->str); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
302 | g_string_free(out, TRUE); |
| 7014 | 303 | } |
| 304 | ||
| 305 | iq = jabber_iq_new_query(js, JABBER_IQ_SET, "jabber:iq:roster"); | |
| 306 | ||
| 307 | query = xmlnode_get_child(iq->node, "query"); | |
| 308 | item = xmlnode_new_child(query, "item"); | |
| 309 | ||
| 310 | xmlnode_set_attrib(item, "jid", name); | |
| 311 | ||
|
24950
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
312 | balias = purple_buddy_get_local_buddy_alias(b); |
|
143f594f0cd0
Alias foo. I think blist.h structs are now completely hidden.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24398
diff
changeset
|
313 | xmlnode_set_attrib(item, "name", balias ? balias : ""); |
| 7014 | 314 | |
| 315 | for(l = groups; l; l = l->next) { | |
| 316 | group = xmlnode_new_child(item, "group"); | |
| 317 | xmlnode_insert_data(group, l->data, -1); | |
| 318 | } | |
| 319 | ||
| 320 | if(!grps) | |
| 321 | g_slist_free(groups); | |
|
26042
4dabdb5fe213
Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
24983
diff
changeset
|
322 | |
| 15265 | 323 | if (js->server_caps & JABBER_CAP_GOOGLE_ROSTER) { |
| 324 | jabber_google_roster_outgoing(js, query, item); | |
| 325 | xmlnode_set_attrib(query, "xmlns:gr", "google:roster"); | |
| 326 | xmlnode_set_attrib(query, "gr:ext", "2"); | |
| 327 | } | |
| 7014 | 328 | jabber_iq_send(iq); |
| 329 | } | |
| 330 | ||
| 15884 | 331 | void jabber_roster_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, |
| 332 | PurpleGroup *group) | |
| 7014 | 333 | { |
| 334 | JabberStream *js = gc->proto_data; | |
| 335 | char *who; | |
| 336 | JabberBuddy *jb; | |
| 7488 | 337 | JabberBuddyResource *jbr; |
| 8194 | 338 | char *my_bare_jid; |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
339 | const char *name; |
| 7014 | 340 | |
| 341 | if(!js->roster_parsed) | |
| 342 | return; | |
| 343 | ||
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
344 | name = purple_buddy_get_name(buddy); |
|
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
345 | if(!(who = jabber_get_bare_jid(name))) |
| 7425 | 346 | return; |
| 7014 | 347 | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
348 | jb = jabber_buddy_find(js, name, FALSE); |
| 7425 | 349 | |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
350 | purple_debug_info("jabber", "jabber_roster_add_buddy(): Adding %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
351 | name); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
352 | |
|
23566
fabe91dee1e1
Alright, I'm getting rid of this "groups" thing for the reason listed
Mark Doliner <markdoliner@pidgin.im>
parents:
22993
diff
changeset
|
353 | jabber_roster_update(js, who, NULL); |
| 7014 | 354 | |
| 8194 | 355 | my_bare_jid = g_strdup_printf("%s@%s", js->user->node, js->user->domain); |
| 9954 | 356 | if(!strcmp(who, my_bare_jid)) { |
| 15884 | 357 | PurplePresence *gpresence; |
| 358 | PurpleStatus *status; | |
| 9954 | 359 | |
| 15884 | 360 | gpresence = purple_account_get_presence(js->gc->account); |
| 361 | status = purple_presence_get_active_status(gpresence); | |
| 9954 | 362 | jabber_presence_fake_to_self(js, status); |
| 363 | } else if(!jb || !(jb->subscription & JABBER_SUB_TO)) { | |
| 7014 | 364 | jabber_presence_subscription_set(js, who, "subscribe"); |
| 9954 | 365 | } else if((jbr =jabber_buddy_find_resource(jb, NULL))) { |
| 15884 | 366 | purple_prpl_got_user_status(gc->account, who, |
| 9954 | 367 | jabber_buddy_state_get_status_id(jbr->state), |
| 9990 | 368 | "priority", jbr->priority, jbr->status ? "message" : NULL, jbr->status, NULL); |
| 9954 | 369 | } |
| 7425 | 370 | |
| 8194 | 371 | g_free(my_bare_jid); |
| 7014 | 372 | g_free(who); |
| 373 | } | |
| 374 | ||
| 15884 | 375 | void jabber_roster_alias_change(PurpleConnection *gc, const char *name, const char *alias) |
| 7014 | 376 | { |
| 15884 | 377 | PurpleBuddy *b = purple_find_buddy(gc->account, name); |
| 7449 | 378 | |
| 15321 | 379 | if(b != NULL) { |
| 15884 | 380 | purple_blist_alias_buddy(b, alias); |
| 7449 | 381 | |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
382 | purple_debug_info("jabber", "jabber_roster_alias_change(): Aliased %s to %s\n", |
|
27242
05618d46ac91
Ladedah I dislike the need to explicitly check for NULL strings.
Paul Aurich <darkrain42@pidgin.im>
parents:
27230
diff
changeset
|
383 | name, alias ? alias : "(null)"); |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
384 | |
| 15321 | 385 | jabber_roster_update(gc->proto_data, name, NULL); |
| 386 | } | |
| 7014 | 387 | } |
| 388 | ||
| 15884 | 389 | void jabber_roster_group_change(PurpleConnection *gc, const char *name, |
| 7014 | 390 | const char *old_group, const char *new_group) |
| 391 | { | |
| 392 | GSList *buddies, *groups = NULL; | |
| 15884 | 393 | PurpleBuddy *b; |
| 394 | PurpleGroup *g; | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
395 | const char *gname; |
| 7014 | 396 | |
| 397 | if(!old_group || !new_group || !strcmp(old_group, new_group)) | |
| 398 | return; | |
| 399 | ||
| 15884 | 400 | buddies = purple_find_buddies(gc->account, name); |
| 7014 | 401 | while(buddies) { |
| 402 | b = buddies->data; | |
| 15884 | 403 | g = purple_buddy_get_group(b); |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
404 | gname = purple_group_get_name(g); |
|
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
405 | if(!strcmp(gname, old_group)) |
| 7014 | 406 | groups = g_slist_append(groups, (char*)new_group); /* ick */ |
| 407 | else | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
408 | groups = g_slist_append(groups, (char*)gname); |
| 7014 | 409 | buddies = g_slist_remove(buddies, b); |
| 410 | } | |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
411 | |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
412 | purple_debug_info("jabber", "jabber_roster_group_change(): Moving %s from %s to %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
413 | name, old_group, new_group); |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
414 | |
| 7014 | 415 | jabber_roster_update(gc->proto_data, name, groups); |
| 416 | g_slist_free(groups); | |
| 417 | } | |
| 418 | ||
| 15884 | 419 | void jabber_roster_group_rename(PurpleConnection *gc, const char *old_name, |
| 420 | PurpleGroup *group, GList *moved_buddies) | |
| 7014 | 421 | { |
| 422 | GList *l; | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
423 | const char *gname = purple_group_get_name(group); |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
424 | for(l = moved_buddies; l; l = l->next) { |
| 15884 | 425 | PurpleBuddy *buddy = l->data; |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
426 | jabber_roster_group_change(gc, purple_buddy_get_name(buddy), old_name, gname); |
| 7014 | 427 | } |
| 428 | } | |
| 429 | ||
| 15884 | 430 | void jabber_roster_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, |
| 431 | PurpleGroup *group) { | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
432 | const char *name = purple_buddy_get_name(buddy); |
|
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
433 | GSList *buddies = purple_find_buddies(purple_connection_get_account(gc), name); |
| 7014 | 434 | |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
435 | buddies = g_slist_remove(buddies, buddy); |
|
15847
da522f9a7743
Don't use g_list_length() and g_slist_length() when all you want to
Mark Doliner <markdoliner@pidgin.im>
parents:
15695
diff
changeset
|
436 | if(buddies != NULL) { |
| 15884 | 437 | PurpleBuddy *tmpbuddy; |
| 438 | PurpleGroup *tmpgroup; | |
|
20225
684334efdc19
applied changes from d4b316d73ebaf93803ca2642e78b8821c3b5d5c7
Luke Schierer <lschiere@pidgin.im>
parents:
20221
diff
changeset
|
439 | GSList *groups = NULL; |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
440 | |
| 7014 | 441 | while(buddies) { |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
442 | tmpbuddy = buddies->data; |
| 15884 | 443 | tmpgroup = purple_buddy_get_group(tmpbuddy); |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
444 | groups = g_slist_append(groups, (char *)purple_group_get_name(tmpgroup)); |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
445 | buddies = g_slist_remove(buddies, tmpbuddy); |
| 7014 | 446 | } |
|
9285
9cedf5d26577
[gaim-migrate @ 10088]
Mark Doliner <markdoliner@pidgin.im>
parents:
8347
diff
changeset
|
447 | |
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
448 | purple_debug_info("jabber", "jabber_roster_remove_buddy(): Removing %s from %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
449 | purple_buddy_get_name(buddy), purple_group_get_name(group)); |
|
27229
3a0922120d87
Pluck Adium's roster debugging from 86720de21a854aa
Paul Aurich <darkrain42@pidgin.im>
parents:
26707
diff
changeset
|
450 | |
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
451 | jabber_roster_update(gc->proto_data, name, groups); |
|
20225
684334efdc19
applied changes from d4b316d73ebaf93803ca2642e78b8821c3b5d5c7
Luke Schierer <lschiere@pidgin.im>
parents:
20221
diff
changeset
|
452 | g_slist_free(groups); |
| 7014 | 453 | } else { |
| 7171 | 454 | JabberIq *iq = jabber_iq_new_query(gc->proto_data, JABBER_IQ_SET, |
| 455 | "jabber:iq:roster"); | |
| 456 | xmlnode *query = xmlnode_get_child(iq->node, "query"); | |
| 457 | xmlnode *item = xmlnode_new_child(query, "item"); | |
| 458 | ||
|
24398
4865c2ee6ea8
Start hiding blist.h internals in prpls.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
24199
diff
changeset
|
459 | xmlnode_set_attrib(item, "jid", name); |
| 7171 | 460 | xmlnode_set_attrib(item, "subscription", "remove"); |
| 461 | ||
|
27230
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
462 | purple_debug_info("jabber", "jabber_roster_remove_buddy(): Removing %s\n", |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
463 | purple_buddy_get_name(buddy)); |
|
17f893b060d7
Add a few more roster debug messages and improve.
Paul Aurich <darkrain42@pidgin.im>
parents:
27229
diff
changeset
|
464 | |
| 7171 | 465 | jabber_iq_send(iq); |
| 7014 | 466 | } |
| 467 | } |