diff libervia/backend/bridge/pb.py @ 4130:02f0adc745c6

core: notifications implementation, first draft: add a new table for notifications, and methods/bridge methods to manipulate them.
author Goffi <goffi@goffi.org>
date Mon, 16 Oct 2023 17:29:31 +0200
parents 4b842c1fb686
children a8a0fa678ce2
line wrap: on
line diff
--- a/libervia/backend/bridge/pb.py	Wed Oct 18 15:30:07 2023 +0200
+++ b/libervia/backend/bridge/pb.py	Mon Oct 16 17:29:31 2023 +0200
@@ -193,6 +193,12 @@
     def message_new(self, uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile):
         self.send_signal("message_new", uid, timestamp, from_jid, to_jid, message, subject, mess_type, extra, profile)
 
+    def notification_deleted(self, id, profile):
+        self.send_signal("notification_deleted", id, profile)
+
+    def notification_new(self, id, timestamp, type, body_plain, body_rich, title, requires_action, priority, expire_at, extra, profile):
+        self.send_signal("notification_new", id, timestamp, type, body_plain, body_rich, title, requires_action, priority, expire_at, extra, profile)
+
     def param_update(self, name, value, category, profile):
         self.send_signal("param_update", name, value, category, profile)