hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
66 stars 41 forks source link

PWA notifications delivery for ios and Android(stub) #7705

Open sachben91 opened 3 months ago

sachben91 commented 3 months ago

Description

Notifications created as part of #6617 should be delivered to the user on both ios and Android OS devices.

Project Owner

No response

Bucket ID

6617

User Stories / Acceptance Criteria

Design Devlink

Prototypes

Design Screenshot

Screenshot 2024-05-06 at 11 37 48 AM

Additional Context

No response

ForestMars commented 3 months ago

Tee'd for Cycle 4 (Subscriptions is prioritized / soft blocker.)

burtonator commented 3 months ago

Starting to work on this now... but here are the initial notes:

https://docs.knock.app/integrations/push/firebase https://firebase.google.com/docs/cloud-messaging/js/client

... I think this is the general overview and I'm still tracking this down.

Oh! Also, the Knock team will give us access to a 'combined channel group' so that we can use Apple and FCM as one object in their workflow. We have to ask and I already requested it.

burtonator commented 3 months ago

Here's another resource... I'm unclear what's up with the vapid certificate now though:

https://developer.chrome.com/blog/web-push-interop-wins#introducing_vapid_for_server_identification

burtonator commented 3 months ago

Update. I have the vapid keys and I know the general flow. There are a number of moving parts here. I should have something working by next week. I have all the credentials I need too including the keys needed in the frontend and backend.

One downside is that our service worker has to be in .js. It can't be in typescript. I went down a rabbit hole and the ServiceWorker types are incorrect for TS plus it means DOM types will be available in TS. To do it with correct types means we need our own repository which isn't really what we want.

burtonator commented 3 months ago

The general flow looks like this:

CleanShot 2024-05-22 at 17 17 52@2x

We also have to figure out:

dillchen commented 1 month ago

wanted to confirm that this is part of the flow that's on demo?

ForestMars commented 3 weeks ago

@burtonator Looks like you have multiple tickets that may have PR, but the PR is not linked on the issue. (Please update all)

ForestMars commented 1 week ago

Seems like this issue also is an orphan with no branch?

burtonator commented 5 days ago

This is related directly to this ticket:

https://github.com/hicommonwealth/commonwealth/issues/6622#issuecomment-2266243915

And we're first waiting for in-app notifications on the client to be shipped.