1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-08-06 12:02:40 +03:00

Fix missing threads in thread list (#2226)

Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Germain
2022-03-10 16:44:42 +00:00
committed by GitHub
parent 40d1674a5c
commit dbcd01bb43
5 changed files with 52 additions and 9 deletions

View File

@@ -126,7 +126,46 @@ describe("Filter Component", function() {
event: true,
});
const eventWithMultipleRelations = mkEvent({
"type": "m.room.message",
"content": {},
"unsigned": {
"m.relations": {
"testtesttest": {},
"m.annotation": {
"chunk": [
{
"type": "m.reaction",
"key": "🤫",
"count": 1,
},
],
},
[RelationType.Thread]: {
count: 2,
current_user_participated: true,
},
},
},
"room": 'roomId',
"event": true,
});
const noMatchEvent = mkEvent({
"type": "m.room.message",
"content": {},
"unsigned": {
"m.relations": {
"testtesttest": {},
},
},
"room": 'roomId',
"event": true,
});
expect(filter.check(threadRootEvent)).toBe(true);
expect(filter.check(eventWithMultipleRelations)).toBe(true);
expect(filter.check(noMatchEvent)).toBe(false);
});
});
});