From 7e85e9b12b9cc3360da7e03d4d70f1fdf3d8cab5 Mon Sep 17 00:00:00 2001
From: LcsTen <lcs10.twinoid@gmail.com>
Date: Mon, 27 Mar 2023 15:44:53 +0200
Subject: [PATCH] Do not display reply action in the recap notif on Mac

---
 src/notifications/ManagerMac.mm | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/notifications/ManagerMac.mm b/src/notifications/ManagerMac.mm
index 39312465e..6da5d0062 100644
--- a/src/notifications/ManagerMac.mm
+++ b/src/notifications/ManagerMac.mm
@@ -106,10 +106,18 @@ void NotificationsManager::objCxxPostNotification(
                                                                                 textInputButtonTitle:sendStr.toNSString()
                                                                                 textInputPlaceholder:placeholder.toNSString()];
 
-    UNNotificationCategory* category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory"
-                                                                              actions:@[ replyAction ]
-                                                                    intentIdentifiers:@[]
-                                                                              options:UNNotificationCategoryOptionNone];
+    UNNotificationCategory* category;
+    if(!room_id.isEmpty()){
+        category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory"
+                                                          actions:@[ replyAction ]
+                                                intentIdentifiers:@[]
+                                                          options:UNNotificationCategoryOptionNone];
+    }else{
+        category = [UNNotificationCategory categoryWithIdentifier:@"ReplyCategory"
+                                                          actions:@[]
+                                                intentIdentifiers:@[]
+                                                          options:UNNotificationCategoryOptionNone];
+    }
 
     NSString* title = room_name.toNSString();
     NSString* sub = subtitle.toNSString();
-- 
GitLab