pidgin: 27d2212b: jabber: Unlock from locked resource on a...
darkrain42 at pidgin.im
darkrain42 at pidgin.im
Mon Mar 8 11:55:45 EST 2010
-----------------------------------------------------------------
Revision: 27d2212b13fda211269f7e2376a3528bb7759369
Ancestor: 787f7fde86bbd0028625e43d9b661df27b8ad4ee
Author: darkrain42 at pidgin.im
Date: 2010-03-08T16:54:02
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/27d2212b13fda211269f7e2376a3528bb7759369
Modified files:
libpurple/protocols/jabber/message.c
ChangeLog:
jabber: Unlock from locked resource on a message *with content*, as opposed to any message.
Thanks to rjoly for testing deryni's fix. Closes #11489
-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/message.c c0f8d79bcffce0d66dcab8f8c65d88bc418bdaf3
+++ libpurple/protocols/jabber/message.c cd808324542a2c49a23f30d0b8b743e2125a6a71
@@ -74,24 +74,6 @@ static void handle_chat(JabberMessage *j
jb = jabber_buddy_find(jm->js, jm->from, TRUE);
jbr = jabber_buddy_find_resource(jb, jid->resource);
- if (jid->resource) {
- /*
- * We received a message from a specific resource, so we probably want a
- * reply to go to this specific resource (i.e. bind/lock the
- * conversation to this resource).
- *
- * This works because purple_conv_im_send gets the name from
- * purple_conversation_get_name()
- */
- PurpleConversation *conv;
-
- conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, jm->from, account);
- if (conv && !g_str_equal(jm->from, purple_conversation_get_name(conv))) {
- purple_debug_info("jabber", "Binding conversation to %s\n", jm->from);
- purple_conversation_set_name(conv, jm->from);
- }
- }
-
if(!jm->xhtml && !jm->body) {
if (jbr) {
if (jm->chat_state != JM_STATE_NONE)
@@ -137,6 +119,28 @@ static void handle_chat(JabberMessage *j
serv_got_typing_stopped(gc, jm->from);
}
} else {
+ if (jid->resource) {
+ /*
+ * We received a message from a specific resource, so
+ * we probably want a reply to go to this specific
+ * resource (i.e. bind/lock the conversation to this
+ * resource).
+ *
+ * This works because purple_conv_im_send gets the name
+ * from purple_conversation_get_name()
+ */
+ PurpleConversation *conv;
+
+ conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM,
+ jm->from, account);
+ if (conv && !g_str_equal(jm->from,
+ purple_conversation_get_name(conv))) {
+ purple_debug_info("jabber", "Binding conversation to %s\n",
+ jm->from);
+ purple_conversation_set_name(conv, jm->from);
+ }
+ }
+
if(jbr) {
if (jm->chat_state != JM_STATE_NONE)
jbr->chat_states = JABBER_CHAT_STATES_SUPPORTED;
More information about the Commits
mailing list