Changes in protocols/jabber/presence.c [840bba8:71d45c2]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
r840bba8 r71d45c2 190 190 int is_away = 0; 191 191 192 if( send_presence->away_state && 193 strcmp( send_presence->away_state->code, "chat" ) != 0)192 if( send_presence->away_state && !( *send_presence->away_state->code == 0 || 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->full_name : NULL, 197 ( is_away && send_presence->away_state ) ? 198 send_presence->away_state->full_name : NULL, 198 199 send_presence->away_message ); 199 200 } … … 208 209 struct jabber_data *jd = ic->proto_data; 209 210 struct xt_node *node, *cap; 211 char *show = jd->away_state->code; 212 char *status = jd->away_message; 210 213 struct groupchat *c; 211 214 int st; … … 213 216 node = jabber_make_packet( "presence", NULL, NULL, NULL ); 214 217 xt_add_child( node, xt_new_node( "priority", set_getstr( &ic->acc->set, "priority" ), 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 ) );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 ) ); 219 222 220 223 /* This makes the packet slightly bigger, but clients interested in
Note: See TracChangeset
for help on using the changeset viewer.