Ignore:
Timestamp:
2010-03-12T19:10:16Z (14 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
dde9d571
Parents:
08e5bb2 (diff), 8b6b740 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merging mainline.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • protocols/jabber/presence.c

    r08e5bb2 rbe609ff  
    187187                int is_away = 0;
    188188
    189                 if( send_presence->away_state && !( *send_presence->away_state->code == 0 ||
    190                     strcmp( send_presence->away_state->code, "chat" ) == 0 ) )
     189                if( send_presence->away_state &&
     190                    strcmp( send_presence->away_state->code, "chat" ) != 0 )
    191191                        is_away = OPT_AWAY;
    192192
    193193                imcb_buddy_status( ic, send_presence->bare_jid, OPT_LOGGED_IN | is_away,
    194                                    ( is_away && send_presence->away_state ) ?
    195                                    send_presence->away_state->full_name : NULL,
     194                                   is_away ? send_presence->away_state->full_name : NULL,
    196195                                   send_presence->away_message );
    197196        }
     
    206205        struct jabber_data *jd = ic->proto_data;
    207206        struct xt_node *node, *cap;
    208         char *show = jd->away_state->code;
    209         char *status = jd->away_message;
    210207        struct groupchat *c;
    211208        int st;
     
    213210        node = jabber_make_packet( "presence", NULL, NULL, NULL );
    214211        xt_add_child( node, xt_new_node( "priority", set_getstr( &ic->acc->set, "priority" ), NULL ) );
    215         if( show && *show )
    216                 xt_add_child( node, xt_new_node( "show", show, NULL ) );
    217         if( status )
    218                 xt_add_child( node, xt_new_node( "status", status, NULL ) );
     212        if( jd->away_state )
     213                xt_add_child( node, xt_new_node( "show", jd->away_state->code, NULL ) );
     214        if( jd->away_message )
     215                xt_add_child( node, xt_new_node( "status", jd->away_message, NULL ) );
    219216       
    220217        /* This makes the packet slightly bigger, but clients interested in
Note: See TracChangeset for help on using the changeset viewer.