Disable Local Push Notifications + Start Handling invite notifications (#882)

* disabled local pushes and fixed the issue with the image rendering

* disabled local notifications for now and started implementing invite notificatons

* disabled local notifications for now and started implementing invite notificatons

* removed code that should not have changed

* removed useless comment

* refactored name for category

* fixed a test

* fix

* fix for missing try await

* pr comments
This commit is contained in:
Mauro
2023-05-12 12:45:59 +02:00
committed by GitHub
parent 185710adf4
commit 23137726de
9 changed files with 133 additions and 74 deletions
@@ -34,14 +34,19 @@ class NotificationManager: NSObject, NotificationManagerProtocol {
weak var delegate: NotificationManagerDelegate?
func start() {
let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
title: L10n.actionQuickReply,
options: [])
let replyCategory = UNNotificationCategory(identifier: NotificationConstants.Category.reply,
actions: [replyAction],
intentIdentifiers: [],
options: [])
notificationCenter.setNotificationCategories([replyCategory])
// Not implemented yet
// let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
// title: L10n.actionQuickReply,
// options: [])
let messageCategory = UNNotificationCategory(identifier: NotificationConstants.Category.message,
actions: [],
intentIdentifiers: [],
options: [])
let inviteCategory = UNNotificationCategory(identifier: NotificationConstants.Category.invite,
actions: [],
intentIdentifiers: [],
options: [])
notificationCenter.setNotificationCategories([messageCategory, inviteCategory])
notificationCenter.delegate = self
}