Skip to content

Commit

Permalink
Enable inline replies for push notifications.
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanceriu committed Nov 20, 2024
1 parent b2137ad commit 1c62792
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ final class NotificationManager: NSObject, NotificationManagerProtocol {
// MARK: NotificationManagerProtocol

weak var delegate: NotificationManagerDelegate?

func start() {
// Not implemented yet
// let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
// title: L10n.actionQuickReply,
// options: [])
let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
title: L10n.actionQuickReply,
options: [])
let messageCategory = UNNotificationCategory(identifier: NotificationConstants.Category.message,
actions: [],
actions: [replyAction],
intentIdentifiers: [],
options: [])

let inviteCategory = UNNotificationCategory(identifier: NotificationConstants.Category.invite,
actions: [],
intentIdentifiers: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,16 @@ final class NotificationManagerTests: XCTestCase {
XCTAssertEqual(request.content.title, "Title")
XCTAssertEqual(request.content.subtitle, "Subtitle")
}

func test_whenStart_notificationCategoriesAreSet() throws {
// let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
// title: L10n.actionQuickReply,
// options: [])
let replyAction = UNTextInputNotificationAction(identifier: NotificationConstants.Action.inlineReply,
title: L10n.actionQuickReply,
options: [])
let messageCategory = UNNotificationCategory(identifier: NotificationConstants.Category.message,
actions: [],
actions: [replyAction],
intentIdentifiers: [],
options: [])

let inviteCategory = UNNotificationCategory(identifier: NotificationConstants.Category.invite,
actions: [],
intentIdentifiers: [],
Expand Down

0 comments on commit 1c62792

Please sign in to comment.