feat: Add notification actions

This commit is contained in:
krille-chan 2024-10-03 17:33:44 +02:00 committed by Christian Kußowski
commit 04b5ecce54
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
4 changed files with 102 additions and 8 deletions

View file

@ -279,16 +279,20 @@ Future<void> _tryPushHelper(
priority: Priority.max,
groupKey: event.room.spaceParents.firstOrNull?.roomId ?? 'rooms',
actions: <AndroidNotificationAction>[
AndroidNotificationAction(
FluffyChatNotificationActions.markAsRead.name,
l10n.markAsRead,
),
AndroidNotificationAction(
FluffyChatNotificationActions.reply.name,
l10n.reply,
inputs: [
const AndroidNotificationActionInput(),
AndroidNotificationActionInput(
label: l10n.writeAMessage,
),
],
cancelNotification: false,
allowGeneratedReplies: true,
),
AndroidNotificationAction(
FluffyChatNotificationActions.markAsRead.name,
l10n.markAsRead,
),
],
);