summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Lundblad <malu@pidgin.im>2009-11-16 20:45:56 +0000
committerMarcus Lundblad <malu@pidgin.im>2009-11-16 20:45:56 +0000
commitc9e1c2ba05581ce42bdceba2d9313ed7259c5b10 (patch)
tree0a3786252424be24bfd5ca1379c3bb94fb01b919
parenta4763fe91cd92a0428e480949cdd0e2df6c3d19a (diff)
downloadpidgin-c9e1c2ba05581ce42bdceba2d9313ed7259c5b10.tar.gz
Let _got_attention call _conversation_attention, instead of having prpls do it
on incoming attentions
-rw-r--r--libpurple/protocols/jabber/message.c4
-rw-r--r--libpurple/protocols/msn/msg.c3
-rw-r--r--libpurple/protocols/yahoo/libymsg.c4
-rw-r--r--libpurple/prpl.c8
4 files changed, 8 insertions, 11 deletions
diff --git a/libpurple/protocols/jabber/message.c b/libpurple/protocols/jabber/message.c
index 9e7feca6fa..c553ac6185 100644
--- a/libpurple/protocols/jabber/message.c
+++ b/libpurple/protocols/jabber/message.c
@@ -294,7 +294,6 @@ static void handle_error(JabberMessage *jm)
static void handle_buzz(JabberMessage *jm) {
PurpleBuddy *buddy;
PurpleAccount *account;
- PurpleConversation *c;
/* Delayed buzz MUST NOT be accepted */
if(jm->delayed)
@@ -311,9 +310,6 @@ static void handle_buzz(JabberMessage *jm) {
/* xmpp only has 1 attention type, so index is 0 */
purple_prpl_got_attention(jm->js->gc, jm->from, 0);
- c = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account);
- if (c)
- purple_conversation_attention(c, jm->from, 0, PURPLE_MESSAGE_RECV, time(NULL));
}
/* used internally by the functions below */
diff --git a/libpurple/protocols/msn/msg.c b/libpurple/protocols/msn/msg.c
index 6eb7c933c5..9e5f16ef4b 100644
--- a/libpurple/protocols/msn/msg.c
+++ b/libpurple/protocols/msn/msg.c
@@ -1043,9 +1043,6 @@ msn_datacast_msg(MsnCmdProc *cmdproc, MsnMessage *msg)
else
purple_prpl_got_attention(account->gc, user, MSN_NUDGE);
-
- purple_conversation_attention(swboard->conv, user, MSN_NUDGE,
- PURPLE_MESSAGE_SEND, time(NULL));
} else {
purple_prpl_got_attention(account->gc, user, MSN_NUDGE);
}
diff --git a/libpurple/protocols/yahoo/libymsg.c b/libpurple/protocols/yahoo/libymsg.c
index 74a0f4d708..d900ab9926 100644
--- a/libpurple/protocols/yahoo/libymsg.c
+++ b/libpurple/protocols/yahoo/libymsg.c
@@ -1123,10 +1123,6 @@ static void yahoo_process_message(PurpleConnection *gc, struct yahoo_packet *pkt
conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY,
username, account);
purple_prpl_got_attention(gc, username, YAHOO_BUZZ);
- if (conv) {
- purple_conversation_attention(conv, username, 0, PURPLE_MESSAGE_RECV,
- time(NULL));
- }
g_free(username);
g_free(m);
g_free(im->fed_from);
diff --git a/libpurple/prpl.c b/libpurple/prpl.c
index 636aee07f2..f8a89d2f4b 100644
--- a/libpurple/prpl.c
+++ b/libpurple/prpl.c
@@ -503,7 +503,15 @@ got_attention(PurpleConnection *gc, int id, const char *who, guint type_code)
void
purple_prpl_got_attention(PurpleConnection *gc, const char *who, guint type_code)
{
+ PurpleConversation *conv = NULL;
+ PurpleAccount *account = purple_connection_get_account(gc);
+
got_attention(gc, -1, who, type_code);
+ conv =
+ purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, who, account);
+ if (conv)
+ purple_conversation_attention(conv, who, type_code, PURPLE_MESSAGE_RECV,
+ time(NULL));
}
void