Mercurial > pidgin.yaz
comparison libpurple/protocols/jabber/message.c @ 29660:008f35e7d538
Use purple_prpl_got_attention
author | Marcus Lundblad <ml@update.uu.se> |
---|---|
date | Thu, 01 Jan 2009 21:01:42 +0000 |
parents | a0fd6a41d127 |
children | 58e1e1463b6e |
comparison
equal
deleted
inserted
replaced
29659:c0f8b11604c2 | 29660:008f35e7d538 |
---|---|
300 if(!jm->js->allowBuzz) | 300 if(!jm->js->allowBuzz) |
301 return; | 301 return; |
302 | 302 |
303 account = purple_connection_get_account(jm->js->gc); | 303 account = purple_connection_get_account(jm->js->gc); |
304 | 304 |
305 if ((buddy = purple_find_buddy(account, jm->from)) != NULL) | 305 if ((buddy = purple_find_buddy(account, jm->from)) == NULL) |
306 username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); | |
307 else | |
308 return; /* Do not accept buzzes from unknown people */ | 306 return; /* Do not accept buzzes from unknown people */ |
309 | 307 |
310 c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, jm->from); | 308 c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account); |
311 | 309 if (c == NULL) |
312 str = g_strdup_printf(_("%s has buzzed you!"), username); | 310 c = purple_conversation_new(PURPLE_CONV_TYPE_IM, account, jm->from); |
313 | 311 |
314 purple_conversation_write(c, NULL, str, PURPLE_MESSAGE_SYSTEM|PURPLE_MESSAGE_NOTIFY, time(NULL)); | 312 username = g_markup_escape_text(purple_buddy_get_alias(buddy), -1); |
313 /* xmpp only has 1 attention type, so index is 0 */ | |
314 purple_prpl_got_attention(jm->js->gc, username, 0); | |
315 purple_conversation_attention(c, username, 0, PURPLE_MESSAGE_RECV, time(NULL)); | 315 purple_conversation_attention(c, username, 0, PURPLE_MESSAGE_RECV, time(NULL)); |
316 g_free(username); | 316 g_free(username); |
317 g_free(str); | 317 g_free(str); |
318 } | 318 } |
319 | 319 |