Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/message.c @ 29704:9198a5d39c5c
Let _got_attention call _conversation_attention, instead of having prpls do it
on incoming attentions
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Mon, 16 Nov 2009 20:45:56 +0000 |
parents | 974748d0e1f2 |
children |
comparison
equal
deleted
inserted
replaced
29703:974748d0e1f2 | 29704:9198a5d39c5c |
---|---|
292 } | 292 } |
293 | 293 |
294 static void handle_buzz(JabberMessage *jm) { | 294 static void handle_buzz(JabberMessage *jm) { |
295 PurpleBuddy *buddy; | 295 PurpleBuddy *buddy; |
296 PurpleAccount *account; | 296 PurpleAccount *account; |
297 PurpleConversation *c; | |
298 | 297 |
299 /* Delayed buzz MUST NOT be accepted */ | 298 /* Delayed buzz MUST NOT be accepted */ |
300 if(jm->delayed) | 299 if(jm->delayed) |
301 return; | 300 return; |
302 | 301 |
309 if ((buddy = purple_find_buddy(account, jm->from)) == NULL) | 308 if ((buddy = purple_find_buddy(account, jm->from)) == NULL) |
310 return; /* Do not accept buzzes from unknown people */ | 309 return; /* Do not accept buzzes from unknown people */ |
311 | 310 |
312 /* xmpp only has 1 attention type, so index is 0 */ | 311 /* xmpp only has 1 attention type, so index is 0 */ |
313 purple_prpl_got_attention(jm->js->gc, jm->from, 0); | 312 purple_prpl_got_attention(jm->js->gc, jm->from, 0); |
314 c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account); | |
315 if (c) | |
316 purple_conversation_attention(c, jm->from, 0, PURPLE_MESSAGE_RECV, time(NULL)); | |
317 } | 313 } |
318 | 314 |
319 /* used internally by the functions below */ | 315 /* used internally by the functions below */ |
320 typedef struct { | 316 typedef struct { |
321 gchar *cid; | 317 gchar *cid; |