aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2010-09-05 11:27:12 +0100
committerWilmer van der Gaast <wilmer@gaast.net>2010-09-05 11:27:12 +0100
commit41e0c00fd22d1cdace2040be5912d64f51f12ab8 (patch)
tree12676e9f2b398131ef7dbf5b78b381d07c6f00cc
parent52d63dc804571c63069a7c1e42e8c3f1f2a76527 (diff)
Fixing handling of (Jabber) chatroom topic changes done by the user.
-rw-r--r--irc_im.c2
-rw-r--r--protocols/jabber/conference.c18
2 files changed, 10 insertions, 10 deletions
diff --git a/irc_im.c b/irc_im.c
index f6229207..7fa70350 100644
--- a/irc_im.c
+++ b/irc_im.c
@@ -797,9 +797,9 @@ static gboolean bee_irc_channel_chat_topic( irc_channel_t *ic, const char *new )
char *topic = g_strdup( new );
c->ic->acc->prpl->chat_topic( c, topic );
g_free( topic );
- return TRUE;
}
+ /* Whatever happened, the IM module should ack the topic change. */
return FALSE;
}
diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c
index e04b9792..0c2db0b3 100644
--- a/protocols/jabber/conference.c
+++ b/protocols/jabber/conference.c
@@ -311,6 +311,15 @@ void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud
struct jabber_chat *jc = chat ? chat->data : NULL;
char *s;
+ if( subject && chat )
+ {
+ s = bud ? strchr( bud->ext_jid, '/' ) : NULL;
+ if( s ) *s = 0;
+ imcb_chat_topic( chat, bud ? bud->ext_jid : NULL, subject->text_len > 0 ?
+ subject->text : NULL, jabber_get_timestamp( node ) );
+ if( s ) *s = '/';
+ }
+
if( bud == NULL || ( jc && ~jc->flags & JCFLAG_MESSAGE_SENT && bud == jc->me ) )
{
char *nick;
@@ -365,15 +374,6 @@ void jabber_chat_pkt_message( struct im_connection *ic, struct jabber_buddy *bud
now or just wait for the OS to do it. :-) */
return;
}
-
- if( subject )
- {
- s = strchr( bud->ext_jid, '/' );
- if( s ) *s = 0;
- imcb_chat_topic( chat, bud->ext_jid, subject->text_len > 0 ?
- subject->text : NULL, jabber_get_timestamp( node ) );
- if( s ) *s = '/';
- }
if( body && body->text_len > 0 )
{
s = strchr( bud->ext_jid, '/' );