Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 5450d6b

Browse files
committed
remove redundant check and add comment
Signed-off-by: Michael Telatynski <[email protected]>
1 parent 625ca96 commit 5450d6b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shouldHideEvent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
function memberEventDiff(ev) {
1818
const diff = {
19-
// a Member Event is a State Event and so its State Key must not be undefined.
20-
isMemberEvent: ev.getType() === 'm.room.member' && ev.getStateKey() !== undefined,
19+
isMemberEvent: ev.getType() === 'm.room.member',
2120
};
2221

22+
// If is not a Member Event then the other checks do not apply, so bail early.
2323
if (!diff.isMemberEvent) return diff;
2424

2525
const content = ev.getContent();

0 commit comments

Comments
 (0)