Merge pull request #2655 from krille-chan/krille/add-mute-notification-action

feat: Add mute notification action
This commit is contained in:
Krille-chan 2026-03-05 15:08:13 +01:00 committed by GitHub
commit 993e12a946
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -2776,5 +2776,9 @@
"removeAdminRights": "Remove admin rights", "removeAdminRights": "Remove admin rights",
"powerLevel": "Power level", "powerLevel": "Power level",
"setPowerLevelDescription": "Power levels define what a member is allowed to do in this room and usually range between 0 and 100.", "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!"
}
} }

View file

@ -174,8 +174,10 @@ Future<void> notificationTap(
parseCommands: false, parseCommands: false,
displayPendingEvent: false, displayPendingEvent: false,
); );
case FluffyChatNotificationActions.mute:
await room.setPushRuleState(PushRuleState.mentionsOnly);
} }
} }
} }
enum FluffyChatNotificationActions { markAsRead, reply } enum FluffyChatNotificationActions { markAsRead, reply, mute }

View file

@ -272,6 +272,11 @@ Future<void> _tryPushHelper(
l10n.markAsRead, l10n.markAsRead,
semanticAction: SemanticAction.markAsRead, semanticAction: SemanticAction.markAsRead,
), ),
AndroidNotificationAction(
FluffyChatNotificationActions.mute.name,
l10n.mute,
semanticAction: SemanticAction.mute,
),
], ],
); );
const iOSPlatformChannelSpecifics = DarwinNotificationDetails(); const iOSPlatformChannelSpecifics = DarwinNotificationDetails();