mirror of
https://git.sr.ht/~emersion/gamja
synced 2024-11-14 19:25:26 -05:00
Make delivery receipts follow read receipts
If a message has been read, it's been delivered. Fixes #23 at least partially. References: https://todo.sr.ht/~emersion/gamja/23
This commit is contained in:
parent
065b3f21fc
commit
77f54080e7
1 changed files with 6 additions and 0 deletions
6
store.js
6
store.js
|
@ -1,3 +1,5 @@
|
|||
import { ReceiptType } from "./state.js";
|
||||
|
||||
const PREFIX = "gamja_";
|
||||
|
||||
class Item {
|
||||
|
@ -90,6 +92,10 @@ export class Buffer {
|
|||
updated = true;
|
||||
}
|
||||
});
|
||||
if (receipts[ReceiptType.DELIVERED] < receipts[ReceiptType.READ]) {
|
||||
receipts[ReceiptType.DELIVERED] = receipts[ReceiptType.READ];
|
||||
updated = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!updated) {
|
||||
|
|
Loading…
Reference in a new issue