mirror of
https://github.com/vector-im/element-call.git
synced 2026-03-28 06:50:26 +00:00
filter
This commit is contained in:
@@ -47,12 +47,13 @@ export default function useReactionsReader(rtcSession: MatrixRTCSession): {
|
||||
);
|
||||
|
||||
reactionsSubject$.current
|
||||
.pipe(delay(REACTION_ACTIVE_TIME_MS))
|
||||
.pipe(delay(REACTION_ACTIVE_TIME_MS + 50))
|
||||
.subscribe((reactions) => {
|
||||
const date = new Date();
|
||||
const nextEntries = Object.fromEntries(
|
||||
Object.entries(reactions).filter(([_, hr]) => hr.expireAfter < date),
|
||||
);
|
||||
console.log("Filtering", nextEntries);
|
||||
if (Object.keys(reactions).length === Object.keys(nextEntries).length) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user