--- a/ChangeLog Sun May 01 09:59:51 2005 -0400
+++ b/ChangeLog Mon May 02 00:13:04 2005 -0400
@@ -1,7 +1,6 @@
Gaim: The Pimpin' Penguin IM Client that's good for the soul!
- * Chatting with multiple Jabber resources works
* Removed parts of the font selection dialog that were not respected
* Fix being invited to a multi user chat on MSN
* Multiple SILC accounts should work now (Pekka Riikonen)
@@ -9,6 +8,7 @@
* Fix gevolution plugin to compile with e-d-s 1.0 or 1.2
* Fix gevolution plugin to remember buddy name when someone added you
+ * Formatting in jabber chats works version 1.2.1 (4/3/2005):
* URL escaping now works with UTF-8 text. This may break some old log
--- a/src/protocols/jabber/chat.c Sun May 01 09:59:51 2005 -0400
+++ b/src/protocols/jabber/chat.c Mon May 02 00:13:04 2005 -0400
@@ -860,5 +860,50 @@
+static void jabber_chat_disco_traffic_cb(JabberStream *js, xmlnode *packet, gpointer data) + xmlnode *query, *x, *error; + int id = GPOINTER_TO_INT(data); + if(!(chat = jabber_chat_find_by_id(js, id))) + if((error = xmlnode_get_child(packet, "error"))) { + /* defaults, in case the conference server doesn't + * support this request */ + if(!(query = xmlnode_get_child(packet, "query"))) + for(x = xmlnode_get_child(query, "feature"); x; x = xmlnode_get_next_twin(x)) { + const char *var = xmlnode_get_attrib(x, "var"); + if(var && !strcmp(var, "http://jabber.org/protocol/xhtml-im")) { +void jabber_chat_disco_traffic(JabberChat *chat) + iq = jabber_iq_new_query(chat->js, JABBER_IQ_GET, + "http://jabber.org/protocol/disco#info"); + query = xmlnode_get_child(iq->node, "query"); + xmlnode_set_attrib(query, "node", "http://jabber.org/protocol/muc#traffic"); + jabber_iq_set_callback(iq, jabber_chat_disco_traffic_cb, GINT_TO_POINTER(chat->id)); --- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/src/protocols/jabber/chat.h Mon May 02 00:13:04 2005 -0400
@@ -0,0 +1,89 @@
+ * @file chat.h Chat stuff + * Copyright (C) 2003 Nathan Walp <faceprint@faceprint.com> + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +#ifndef _GAIM_JABBER_CHAT_H_ +#define _GAIM_JABBER_CHAT_H_ +#include "conversation.h" +typedef struct _JabberChatMember { +typedef struct _JabberChat { + GaimConversation *conv; + GaimRequestType config_dialog_type; + void *config_dialog_handle; +GList *jabber_chat_info(GaimConnection *gc); +GHashTable *jabber_chat_info_defaults(GaimConnection *gc, const char *chat_name); +char *jabber_get_chat_name(GHashTable *data); +void jabber_chat_join(GaimConnection *gc, GHashTable *data); +JabberChat *jabber_chat_find(JabberStream *js, const char *room, +JabberChat *jabber_chat_find_by_id(JabberStream *js, int id); +JabberChat *jabber_chat_find_by_conv(GaimConversation *conv); +void jabber_chat_destroy(JabberChat *chat); +void jabber_chat_free(JabberChat *chat); +gboolean jabber_chat_find_buddy(GaimConversation *conv, const char *name); +void jabber_chat_invite(GaimConnection *gc, int id, const char *message, +void jabber_chat_leave(GaimConnection *gc, int id); +char *jabber_chat_buddy_real_name(GaimConnection *gc, int id, const char *who); +void jabber_chat_request_room_configure(JabberChat *chat); +void jabber_chat_create_instant_room(JabberChat *chat); +void jabber_chat_register(JabberChat *chat); +void jabber_chat_change_topic(JabberChat *chat, const char *topic); +void jabber_chat_set_topic(GaimConnection *gc, int id, const char *topic); +void jabber_chat_change_nick(JabberChat *chat, const char *nick); +void jabber_chat_part(JabberChat *chat, const char *msg); +void jabber_chat_track_handle(JabberChat *chat, const char *handle, + const char *jid, const char *affiliation, const char *role); +void jabber_chat_remove_handle(JabberChat *chat, const char *handle); +gboolean jabber_chat_ban_user(JabberChat *chat, const char *who, +gboolean jabber_chat_kick_user(JabberChat *chat, const char *who, +GaimRoomlist *jabber_roomlist_get_list(GaimConnection *gc); +void jabber_roomlist_cancel(GaimRoomlist *list); +void jabber_chat_disco_traffic(JabberChat *chat); +#endif /* _GAIM_JABBER_CHAT_H_ */ --- a/src/protocols/jabber/presence.c Sun May 01 09:59:51 2005 -0400
+++ b/src/protocols/jabber/presence.c Mon May 02 00:13:04 2005 -0400
@@ -433,6 +433,8 @@
chat->conv = serv_got_joined_chat(js->gc, chat->id, room_jid);
gaim_conv_chat_set_nick(GAIM_CONV_CHAT(chat->conv), chat->handle);
+ jabber_chat_disco_traffic(chat); jabber_buddy_track_resource(jb, jid->resource, priority, state,