Changeset be609ff for protocols/jabber/presence.c
- Timestamp:
- 2010-03-12T19:10:16Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
r08e5bb2 rbe609ff 187 187 int is_away = 0; 188 188 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 ) 191 191 is_away = OPT_AWAY; 192 192 193 193 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, 196 195 send_presence->away_message ); 197 196 } … … 206 205 struct jabber_data *jd = ic->proto_data; 207 206 struct xt_node *node, *cap; 208 char *show = jd->away_state->code;209 char *status = jd->away_message;210 207 struct groupchat *c; 211 208 int st; … … 213 210 node = jabber_make_packet( "presence", NULL, NULL, NULL ); 214 211 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 ) ); 219 216 220 217 /* This makes the packet slightly bigger, but clients interested in
Note: See TracChangeset
for help on using the changeset viewer.