chore: Follow up nicer state events

This commit is contained in:
Christian Pauly 2022-10-15 11:11:36 +02:00
commit 5668bfbad8
3 changed files with 31 additions and 49 deletions

View file

@ -22,10 +22,12 @@ extension IsStateExtension on Event {
(!AppConfig.hideUnimportantStateEvents ||
!isState ||
importantStateEvents.contains(type)) &&
// hide member events in public rooms
// hide simple join/leave member events in public rooms
(!AppConfig.hideUnimportantStateEvents ||
type != EventTypes.RoomMember ||
room.joinRules != JoinRules.public);
room.joinRules != JoinRules.public ||
content.tryGet<String>('membership') == 'ban' ||
stateKey != senderId);
static const Set<String> importantStateEvents = {
EventTypes.Encryption,