Changeset fb020ac for protocols/jabber/presence.c
- Timestamp:
- 2010-03-07T18:43:23Z (15 years ago)
- Branches:
- master
- Children:
- 279607e
- Parents:
- e08e53c (diff), c32f492 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
re08e53c rfb020ac 190 190 int is_away = 0; 191 191 192 if( send_presence->away_state && !( *send_presence->away_state->code == 0 ||193 strcmp( send_presence->away_state->code, "chat" ) == 0 ))192 if( send_presence->away_state && 193 strcmp( send_presence->away_state->code, "chat" ) != 0 ) 194 194 is_away = OPT_AWAY; 195 195 196 196 imcb_buddy_status( ic, send_presence->bare_jid, OPT_LOGGED_IN | is_away, 197 ( is_away && send_presence->away_state ) ? 198 send_presence->away_state->full_name : NULL, 197 is_away ? send_presence->away_state->full_name : NULL, 199 198 send_presence->away_message ); 200 199 } … … 209 208 struct jabber_data *jd = ic->proto_data; 210 209 struct xt_node *node, *cap; 211 char *show = jd->away_state->code;212 char *status = jd->away_message;213 210 struct groupchat *c; 214 211 int st; … … 216 213 node = jabber_make_packet( "presence", NULL, NULL, NULL ); 217 214 xt_add_child( node, xt_new_node( "priority", set_getstr( &ic->acc->set, "priority" ), NULL ) ); 218 if( show && *show)219 xt_add_child( node, xt_new_node( "show", show, NULL ) );220 if( status)221 xt_add_child( node, xt_new_node( "status", status, NULL ) );215 if( jd->away_state ) 216 xt_add_child( node, xt_new_node( "show", jd->away_state->code, NULL ) ); 217 if( jd->away_message ) 218 xt_add_child( node, xt_new_node( "status", jd->away_message, NULL ) ); 222 219 223 220 /* This makes the packet slightly bigger, but clients interested in
Note: See TracChangeset
for help on using the changeset viewer.