From c9c580c9da8a7662247fde16c400168fd4339fe0 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 24 Jun 2021 22:49:01 -0700 Subject: [PATCH] Stub Notifications for Group Messages Linux --- lib/cwtch/cwtchNotifier.dart | 1 + lib/notification_manager.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cwtch/cwtchNotifier.dart b/lib/cwtch/cwtchNotifier.dart index a6e15b91..d5597674 100644 --- a/lib/cwtch/cwtchNotifier.dart +++ b/lib/cwtch/cwtchNotifier.dart @@ -131,6 +131,7 @@ class CwtchNotifier { } profileCN.getProfile(data["ProfileOnion"])?.contactList.getContact(data["GroupID"])!.totalMessages++; profileCN.getProfile(data["ProfileOnion"])?.contactList.updateLastMessageTime(data["GroupID"], DateTime.now()); + notificationManager.notify("New Message From Group!"); } else { // from me (already displayed - do not update counter) var idx = data["Signature"]; diff --git a/lib/notification_manager.dart b/lib/notification_manager.dart index d6c69253..2f6701ad 100644 --- a/lib/notification_manager.dart +++ b/lib/notification_manager.dart @@ -20,6 +20,6 @@ class LinuxNotificationsManager implements NotificationsManager { LinuxNotificationsManager() {} Future notify(String message) async { var icon_path = Uri.file(path.join(path.current, "cwtch.png")); - client.notify('New Message from Peer!', appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id); + client.notify(message, appName: "cwtch", appIcon: icon_path.toString(), replacesId: this.previous_id).then((Notification value) => previous_id = value.id); } }