Process stanzas from mam one-by-one

This commit is contained in:
Christoph Scholz 2019-09-19 16:25:16 +02:00 committed by JC Brand
parent 51b818f916
commit cd5dacbe29
2 changed files with 10 additions and 1 deletions

View File

@ -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)

View File

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