From 8bdaa410dbfd24771dc3a021be889cab6c9cead7 Mon Sep 17 00:00:00 2001 From: JC Brand Date: Wed, 3 Jan 2018 15:50:02 +0000 Subject: [PATCH] Also take delayed messages into account when checking if new --- src/utils.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.js b/src/utils.js index c590a07ed..b3f98e311 100644 --- a/src/utils.js +++ b/src/utils.js @@ -338,9 +338,10 @@ * message, i.e. not a MAM archived one. */ 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 { - return !message.get('archive_id'); + return !message.get('archive_id') && !message.get('delayed'); } };