1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-08 21:42:24 +03:00

Merge pull request #6378 from matrix-org/travis/widgets/fix-state-read

Exclude state events from widgets reading room events
This commit is contained in:
Travis Ralston
2021-07-14 12:59:58 -06:00
committed by GitHub

View File

@@ -159,7 +159,7 @@ export class StopGapWidgetDriver extends WidgetDriver {
if (results.length >= limit) break;
const ev = events[i];
if (ev.getType() !== eventType) continue;
if (ev.getType() !== eventType || ev.isState()) continue;
if (eventType === EventType.RoomMessage && msgtype && msgtype !== ev.getContent()['msgtype']) continue;
results.push(ev);
}