Commit cd5dacbe authored by Christoph Scholz's avatar Christoph Scholz Committed by JC Brand

Process stanzas from mam one-by-one

parent 51b818f9
......@@ -5,6 +5,8 @@
- Bugfix: Don't treat every duplicate message ID as a message correction; since some
clients don't use globally unique ID's this causes false positives.
- #1712: `TypeError: plugin._features is not a function`
- Bugfix: process stanzas from mam one-by-one in order to correctly process message
receipts
## 5.0.3 (2019-09-13)
......
......@@ -126,7 +126,14 @@ converse.plugins.add('converse-mam', {
}, options);
const result = await _converse.api.archive.query(query);
result.messages.forEach(message_handler);
/* eslint-disable no-await-in-loop */
for (const message of result.messages) {
try {
await message_handler(message);
} catch (e) {
_converse.log(e, Strophe.LogLevel.ERROR);
}
}
if (result.error) {
result.error.retry = () => this.fetchArchivedMessages(options, page);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment