Changeset 31dbb90a for protocols/jabber


Ignore:
Timestamp:
2010-08-30T22:02:46Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
4c737ebd, f5c0d8e
Parents:
fda55fa
Message:

Suppress subjects in Jabber conversations after showing them once.

Location:
protocols/jabber
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/jabber.h

    rfda55fa r31dbb90a  
    5959        JBFLAG_IS_ANONYMOUS = 8,        /* For anonymous chatrooms, when we don't have
    6060                                           have a real JID. */
     61        JBFLAG_HIDE_SUBJECT = 16,       /* Hide the subject field since we probably
     62                                           showed it already. */
    6163} jabber_buddy_flags_t;
    6264
  • protocols/jabber/message.c

    rfda55fa r31dbb90a  
    9393                        }
    9494                }
    95                 else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 )
     95                else if( ( c = xt_find_node( node->children, "subject" ) ) && c->text_len > 0 &&
     96                         ( !bud || !( bud->flags & JBFLAG_HIDE_SUBJECT ) ) )
    9697                {
    9798                        g_string_append_printf( fullmsg, "<< \002BitlBee\002 - Message with subject: %s >>\n", c->text );
     99                        if( bud )
     100                                bud->flags |= JBFLAG_HIDE_SUBJECT;
     101                }
     102                else if( bud && !c )
     103                {
     104                        /* Yeah, possibly we're hiding changes to this field now. But nobody uses
     105                           this for anything useful anyway, except GMail when people reply to an
     106                           e-mail via chat, repeating the same subject all the time. I don't want
     107                           to have to remember full subject strings for everyone. */
     108                        bud->flags &= ~JBFLAG_HIDE_SUBJECT;
    98109                }
    99110               
Note: See TracChangeset for help on using the changeset viewer.