소스 검색

Bugfix. Duplicate messages slipped through if they were forwarded.

JC Brand 10 년 전
부모
커밋
8d84d5ed03
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      converse.js

+ 2 - 2
converse.js

@@ -3466,8 +3466,7 @@
                 /* Handler method for all incoming single-user chat "message" stanzas.
                  */
                 var $message = $(message),
-                    contact_jid, $forwarded, $delay, from_bare_jid, from_resource, is_me,
-                    msgid = $message.attr('id'),
+                    contact_jid, $forwarded, $delay, from_bare_jid, from_resource, is_me, msgid,
                     chatbox, resource, roster_item,
                     from_jid = $message.attr('from'),
                     to_jid = $message.attr('to'),
@@ -3493,6 +3492,7 @@
                 from_bare_jid = Strophe.getBareJidFromJid(from_jid);
                 from_resource = Strophe.getResourceFromJid(from_jid);
                 is_me = from_bare_jid == converse.bare_jid;
+                msgid = $message.attr('id');
 
                 if (is_me) {
                     // I am the sender, so this must be a forwarded message...