| 94 xmlnode *presence, *x, *photo; |
94 xmlnode *presence, *x, *photo; |
| 95 char *stripped = NULL; |
95 char *stripped = NULL; |
| 96 const char *msg; |
96 const char *msg; |
| 97 JabberBuddyState state; |
97 JabberBuddyState state; |
| 98 int priority; |
98 int priority; |
| |
99 |
| |
100 if(!gaim_status_is_active(status)) |
| |
101 return; |
| 99 |
102 |
| 100 if(!account) return ; |
103 if(!account) return ; |
| 101 gc = account->gc; |
104 gc = account->gc; |
| 102 |
105 |
| 103 if(!gc) return ; |
106 if(!gc) return ; |
| 448 chat->muc = muc; |
451 chat->muc = muc; |
| 449 chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid); |
452 chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid); |
| 450 g_free(chat->handle); |
453 g_free(chat->handle); |
| 451 chat->handle = g_strdup(jid->resource); |
454 chat->handle = g_strdup(jid->resource); |
| 452 gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), jid->resource); |
455 gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), jid->resource); |
| |
456 |
| |
457 /* <iq to='room@server' |
| |
458 type='get'> |
| |
459 <query xmlns='http://jabber.org/protocol/disco#info' |
| |
460 node='http://jabber.org/protocol/muc#traffic'/> |
| |
461 </iq> |
| |
462 */ |
| |
463 /* expected response format: |
| |
464 <iq from='room@server' |
| |
465 type='get'> |
| |
466 <query xmlns='http://jabber.org/protocol/disco#info' |
| |
467 node='http://jabber.org/protocol/muc#traffic'> |
| |
468 <feature var='http://jabber.org/protocol/xhtml-im'/> |
| |
469 <feature var='jabber:x:roster/'/> |
| |
470 </query> |
| |
471 </iq> |
| |
472 */ |
| |
473 /* |
| |
474 * XXX: i'm not sure if we turn off XHTML unless we get |
| |
475 * xhtml back in this, or if we turn it off only if we |
| |
476 * get a response, and it's not there. Ask stpeter to |
| |
477 * clarify. |
| |
478 */ |
| 453 } |
479 } |
| 454 |
480 |
| 455 jabber_buddy_track_resource(jb, jid->resource, priority, state, |
481 jabber_buddy_track_resource(jb, jid->resource, priority, state, |
| 456 status); |
482 status); |
| 457 |
483 |
| 464 gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(chat->conv), jid->resource, |
490 gaim_conv_chat_user_set_flags(GAIM_CONV_CHAT(chat->conv), jid->resource, |
| 465 flags); |
491 flags); |
| 466 } |
492 } |
| 467 g_free(room_jid); |
493 g_free(room_jid); |
| 468 } else { |
494 } else { |
| 469 if(state != JABBER_BUDDY_STATE_ERROR && !(jb->subscription & JABBER_SUB_TO)) { |
495 if(state != JABBER_BUDDY_STATE_ERROR && !(jb->subscription & JABBER_SUB_TO || jb->subscription & JABBER_SUB_PENDING)) { |
| 470 gaim_debug(GAIM_DEBUG_INFO, "jabber", |
496 gaim_debug(GAIM_DEBUG_INFO, "jabber", |
| 471 "got unexpected presence from %s, ignoring\n", from); |
497 "got unexpected presence from %s, ignoring\n", from); |
| 472 jabber_id_free(jid); |
498 jabber_id_free(jid); |
| 473 g_free(status); |
499 g_free(status); |
| 474 if(avatar_hash) |
500 if(avatar_hash) |