diff options
author | Marcus Lundblad <malu@pidgin.im> | 2010-02-28 19:34:49 +0000 |
---|---|---|
committer | Marcus Lundblad <malu@pidgin.im> | 2010-02-28 19:34:49 +0000 |
commit | 73eb9ac62ba243f64a98dc36c5e32a0f736dc9a0 (patch) | |
tree | 513f102b7740b0055b1b1a77d38a23edec2288e4 | |
parent | b7984a7b292b5100105cadc58c0a6830aaec067d (diff) | |
download | pidgin-73eb9ac62ba243f64a98dc36c5e32a0f736dc9a0.tar.gz |
jabber: Print an error message to the current conversation when failing to
send an attention using UI
-rw-r--r-- | libpurple/protocols/jabber/jabber.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libpurple/protocols/jabber/jabber.c b/libpurple/protocols/jabber/jabber.c index 0bdf8dd6bb..a5e4f316e2 100644 --- a/libpurple/protocols/jabber/jabber.c +++ b/libpurple/protocols/jabber/jabber.c @@ -2957,7 +2957,16 @@ gboolean jabber_send_attention(PurpleConnection *gc, const char *username, guint gchar *error = NULL; if (!_jabber_send_buzz(js, username, &error)) { + PurpleAccount *account = purple_connection_get_account(gc); + PurpleConversation *conv = + purple_find_conversation_with_account(PURPLE_CONV_TYPE_ANY, username, account); purple_debug_error("jabber", "jabber_send_attention: jabber_cmd_buzz failed with error: %s\n", error ? error : "(NULL)"); + + if (conv) { + purple_conversation_write(conv, username, error, PURPLE_MESSAGE_ERROR, + time(NULL)); + } + g_free(error); return FALSE; } |