diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index 18bf66dd5..f7ff5d48c 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -2776,5 +2776,9 @@ "removeAdminRights": "Remove admin rights", "powerLevel": "Power level", "setPowerLevelDescription": "Power levels define what a member is allowed to do in this room and usually range between 0 and 100.", - "owner": "Owner" + "owner": "Owner", + "mute": "Mute", + "@mute": { + "description": "This should be a very short string because there is not much space in the button!" + } } \ No newline at end of file diff --git a/lib/utils/notification_background_handler.dart b/lib/utils/notification_background_handler.dart index c3d14eeb4..4c85800f1 100644 --- a/lib/utils/notification_background_handler.dart +++ b/lib/utils/notification_background_handler.dart @@ -174,8 +174,10 @@ Future notificationTap( parseCommands: false, displayPendingEvent: false, ); + case FluffyChatNotificationActions.mute: + await room.setPushRuleState(PushRuleState.mentionsOnly); } } } -enum FluffyChatNotificationActions { markAsRead, reply } +enum FluffyChatNotificationActions { markAsRead, reply, mute } diff --git a/lib/utils/push_helper.dart b/lib/utils/push_helper.dart index e41f2d305..05d40b572 100644 --- a/lib/utils/push_helper.dart +++ b/lib/utils/push_helper.dart @@ -272,6 +272,11 @@ Future _tryPushHelper( l10n.markAsRead, semanticAction: SemanticAction.markAsRead, ), + AndroidNotificationAction( + FluffyChatNotificationActions.mute.name, + l10n.mute, + semanticAction: SemanticAction.mute, + ), ], ); const iOSPlatformChannelSpecifics = DarwinNotificationDetails();