Also take delayed messages into account when checking if new

This commit is contained in:
JC Brand 2018-01-03 15:50:02 +00:00
parent 3a6f7ed109
commit 8bdaa410db

View File

@ -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');
} }
}; };