Push Notifications using UnifiedPush #35
Labels
No labels
Blocked
Good First Issue
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Nexus/nexus#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Using this commit to detail what's needed for push notifications.
Essentially, the easiest way by far would be by using MSC4174 (Web Push), so I would like to wait for this. Otherwise, we would need to host an NTFY or similar.
An alternative, of course, is keeping the app running in the background, but I'd like to avoid this.
Okay, I've thought about how this would work, and I'm recording my thoughts here. I definitely want to use Web Push.
I believe how everything works is:
Registration
build.gradle:/_matrix/client/v3/pushers/set)We
POSTto/_matrix/client/v3/pushers/ackwith theapp_idandack_tokenparameters that we got earlier. This activates the pusher, for future use.Receiving Notifications
ClientController.getEventto fetch the event, and checkEvent.unreadType. If it's at leastUnreadType.notify, we send a system notification, probably using flutter_local_notifications. I suppose when we support calls, if the notification is a call, we pop up with a call UI.Recording past notifications
We can probably use
Room.notificationsaggregated from all rooms to create a global "Notifications" page. If this doesn't work, we can also record notifications ourselves on the receival step.Acting upon notifications
getNotificationAppLaunchDetailsfrom flutter_local_notifications, though we may have to register with DBus on Linux.