Преглед изворни кода

Send messages from full JID. Fixes #13.

Messages sent between two Gtalk accounts weren't being received.
JC Brand пре 12 година
родитељ
комит
457a11c54e
2 измењених фајлова са 2 додато и 1 уклоњено
  1. 1 0
      CHANGES.rst
  2. 1 1
      converse.js

+ 1 - 0
CHANGES.rst

@@ -4,6 +4,7 @@ Changelog
 0.5.1 (Unreleased)
 0.5.1 (Unreleased)
 ------------------
 ------------------
 
 
+- #13: Messages sent between to GTalk accounts weren't being received. [jcbrand]
 - #32: Default status was offline when user didn't have contacts. [jcbrand]
 - #32: Default status was offline when user didn't have contacts. [jcbrand]
 - Attach panels to the DOM upon initialize. [jcbrand]
 - Attach panels to the DOM upon initialize. [jcbrand]
 
 

+ 1 - 1
converse.js

@@ -381,7 +381,7 @@
                         return;
                         return;
                     }
                     }
                 }
                 }
-                var message = $msg({from: converse.bare_jid, to: bare_jid, type: 'chat', id: timestamp})
+                var message = $msg({from: converse.connection.jid, to: bare_jid, type: 'chat', id: timestamp})
                     .c('body').t(text).up()
                     .c('body').t(text).up()
                     .c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'});
                     .c('active', {'xmlns': 'http://jabber.org/protocol/chatstates'});
                 // Forward the message, so that other connected resources are also aware of it.
                 // Forward the message, so that other connected resources are also aware of it.