Ignore chat effect when older than 48h (#48)

* Ignore effect later than 48h

* Add tests for `EffectsOverlay-test.tsx`
This commit is contained in:
Florian Duros 2024-09-19 11:39:32 +02:00 committed by GitHub
parent 0cc0ebe2ed
commit 4776f87775
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 84 additions and 3 deletions

View file

@ -1364,7 +1364,7 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
if (containsEmoji(ev.getContent(), effect.emojis) || ev.getContent().msgtype === effect.msgType) {
// For initial threads launch, chat effects are disabled see #19731
if (!ev.isRelation(THREAD_RELATION_TYPE.name)) {
dis.dispatch({ action: `effects.${effect.command}` });
dis.dispatch({ action: `effects.${effect.command}`, event: ev });
}
}
});