Răsfoiți Sursa

Also take delayed messages into account when checking if new

JC Brand 7 ani în urmă
părinte
comite
8bdaa410db
1 a modificat fișierele cu 3 adăugiri și 2 ștergeri
  1. 3 2
      src/utils.js

+ 3 - 2
src/utils.js

@@ -338,9 +338,10 @@
          * message, i.e. not a MAM archived one.
          * message, i.e. not a MAM archived one.
          */
          */
         if (message instanceof Element) {
         if (message instanceof Element) {
-            return !(sizzle('result[xmlns="'+Strophe.NS.MAM+'"]', message).length);
+            return !sizzle('result[xmlns="'+Strophe.NS.MAM+'"]', message).length &&
+                   !sizzle('delay[xmlns="'+Strophe.NS.DELAY+'"]', message).length;
         } else {
         } else {
-            return !message.get('archive_id');
+            return !message.get('archive_id') && !message.get('delayed');
         }
         }
     };
     };