forked from CringeStudios/gamja
components/app: close notifications when receiving READ message
This commit is contained in:
parent
7c6f334dbf
commit
0636544c40
@ -1022,6 +1022,14 @@ export default class App extends Component {
|
||||
server: client.params,
|
||||
receipts: { [ReceiptType.READ]: readReceipt },
|
||||
});
|
||||
for (let notif of this.messageNotifications) {
|
||||
if (client.cm(notif.data.bufferName) !== client.cm(target)) {
|
||||
continue;
|
||||
}
|
||||
if (isMessageBeforeReceipt(notif.data.message, readReceipt)) {
|
||||
notif.close();
|
||||
}
|
||||
}
|
||||
this.setBufferState({ server: serverID, name: target }, (buf) => {
|
||||
if (buf.prevReadReceipt && buf.prevReadReceipt.time >= readReceipt.time) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user