Skip to content

Commit

Permalink
feat: move mute and unmute to extension of room
Browse files Browse the repository at this point in the history
  • Loading branch information
sherlockvn authored and hoangdat committed Sep 29, 2023
1 parent 7b73605 commit 4c2b973
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/domain/model/room/room_extension.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ extension RoomExtension on Room {
EventTypes.Encrypted,
].contains(lastEvent?.type);
}

Future<void> mute() async {
await setPushRuleState(PushRuleState.mentionsOnly);
}

Future<void> unmute() async {
await setPushRuleState(PushRuleState.notify);
}
}

0 comments on commit 4c2b973

Please sign in to comment.