Skip to content

Commit 5a9f821

Browse files
authored
Fix issue 1896 (#1897)
* fix issue #1896 * Added issue to CHANGES.md
1 parent f02caff commit 5a9f821

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGES.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
example: export BOOTSTRAP_IGNORE_MODULES="Modal,Dropdown" && make dist
2121
- New config option [modtools_disable_query](https://conversejs.org/docs/html/configuration.html#modtools-disable-query)
2222
- New config option [modtools_disable_assign](https://conversejs.org/docs/html/configuration.html#modtools-disable-assign)
23+
- #1896: Sending receipts for messages fetched from the archive
2324

2425
## 6.0.0 (2020-01-09)
2526

src/headless/converse-chat.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ converse.plugins.add('converse-chat', {
389389
if (message) {
390390
this.updateMessage(message, original_stanza);
391391
} else if (
392-
!this.handleReceipt (stanza, from_jid) &&
392+
!this.handleReceipt (stanza, original_stanza, from_jid) &&
393393
!this.handleChatMarker(stanza, from_jid)
394394
) {
395395
if (this.handleRetraction(attrs)) {
@@ -808,10 +808,10 @@ converse.plugins.add('converse-chat', {
808808
_converse.api.send(receipt_stanza);
809809
},
810810

811-
handleReceipt (stanza, from_jid) {
811+
handleReceipt (stanza, original_stanza, from_jid) {
812812
const is_me = Strophe.getBareJidFromJid(from_jid) === _converse.bare_jid;
813813
const requests_receipt = sizzle(`request[xmlns="${Strophe.NS.RECEIPTS}"]`, stanza).pop() !== undefined;
814-
if (requests_receipt && !is_me && !u.isCarbonMessage(stanza)) {
814+
if (requests_receipt && !is_me && !u.isCarbonMessage(stanza) && !u.isMAMMessage(original_stanza)) {
815815
this.sendReceiptStanza(from_jid, stanza.getAttribute('id'));
816816
}
817817
const to_bare_jid = Strophe.getBareJidFromJid(stanza.getAttribute('to'));

0 commit comments

Comments
 (0)