summary refs log tree commit diff
path: root/src/notifications
diff options
context:
space:
mode:
Diffstat (limited to 'src/notifications')
-rw-r--r--src/notifications/ManagerMac.mm16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/notifications/ManagerMac.mm b/src/notifications/ManagerMac.mm
index 39312465..6da5d006 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();