diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-31 00:02:46 +0200 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-08-31 00:02:46 +0200 |
commit | 31dbb90a2d32d6988706ae4b5c2292cd43d89595 (patch) | |
tree | 2d8dd665a934ec4c082a0ed03accc76297597d7a /protocols/jabber/message.c | |
parent | fda55fa31f4e5bbf040c712c22f744916c01fca1 (diff) |
Suppress subjects in Jabber conversations after showing them once.
Diffstat (limited to 'protocols/jabber/message.c')
-rw-r--r-- | protocols/jabber/message.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/protocols/jabber/message.c b/protocols/jabber/message.c index 6e40e521..85c71c9d 100644 --- a/protocols/jabber/message.c +++ b/protocols/jabber/message.c @@ -92,9 +92,20 @@ xt_status jabber_pkt_message( struct xt_node *node, gpointer data ) g_string_append_printf( fullmsg, "URL: %s\n", url->text ); } } - else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 ) + else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 && + ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) ) { g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text ); + if( bud ) + bud->flags |= JBFLAG_HIDE_SUBJECT; + } + else if( bud && !c ) + { + /* Yeah, possibly we're hiding changes to this field now. But nobody uses + this for anything useful anyway, except GMail when people reply to an + e-mail via chat, repeating the same subject all the time. I don't want + to have to remember full subject strings for everyone. */ + bud->flags &= ~JBFLAG_HIDE_SUBJECT; } if( body && body->text_len > 0 ) /* Could be just a typing notification. */ |