- Timestamp:
- 2007-07-01T15:22:42Z (17 years ago)
- Branches:
- master
- Children:
- b9f8b87
- Parents:
- 40ef702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/jabber/presence.c
r40ef702 r2758cfe 31 31 struct xt_node *c; 32 32 struct jabber_buddy *bud; 33 int is_chat = 0 ;33 int is_chat = 0, is_away = 0; 34 34 char *s; 35 35 … … 47 47 if( type == NULL ) 48 48 { 49 int is_away = 0;50 51 49 if( !( bud = jabber_buddy_by_jid( ic, from, GET_BUDDY_EXACT | GET_BUDDY_CREAT ) ) ) 52 50 { … … 113 111 *s = 0; 114 112 115 /* Only count this as offline if there's no other resource 116 available anymore. */ 117 if( jabber_buddy_by_jid( ic, from, 0 ) == NULL ) 113 /* If another resource is still available, send its presence 114 information. */ 115 if( ( bud = jabber_buddy_by_jid( ic, from, 0 ) ) ) 116 { 117 if( bud->away_state && ( *bud->away_state->code == 0 || 118 strcmp( bud->away_state->code, "chat" ) == 0 ) ) 119 is_away = OPT_AWAY; 120 121 imcb_buddy_status( ic, bud->bare_jid, OPT_LOGGED_IN | is_away, 122 ( is_away && bud->away_state ) ? bud->away_state->full_name : NULL, 123 bud->away_message ); 124 } 125 else 126 { 127 /* Otherwise, count him/her as offline now. */ 118 128 imcb_buddy_status( ic, from, 0, NULL, NULL ); 119 /* FIXME: If this resource was not away and another resource is, 120 we should definitely send an update here. */ 129 } 121 130 122 131 *s = '/';
Note: See TracChangeset
for help on using the changeset viewer.