Page MenuHomePhabricator

[keyserver] Send updateBadgeCount notifs to macOS
ClosedPublic

Authored by michal on Mar 17 2023, 10:55 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Feb 23, 11:49 AM
Unknown Object (File)
Fri, Feb 23, 11:00 AM
Unknown Object (File)
Fri, Feb 23, 10:43 AM
Unknown Object (File)
Fri, Feb 23, 10:06 AM
Unknown Object (File)
Fri, Feb 23, 9:47 AM
Unknown Object (File)
Fri, Feb 23, 8:40 AM
Unknown Object (File)
Fri, Feb 23, 6:02 AM
Unknown Object (File)
Wed, Feb 21, 9:44 PM
Subscribers

Details

Summary

ENG-3174

We want to send updateBadgeCount notifs to macOS. This works exactly the same as the iOS version, just replaced the ios with macos.

Test Plan
  • Open the desktop app
  • Send a message from another user -> desktop app gets a notification and macOS dock badge updates
  • Read the message on another device -> the dock badge disappears, in the logs we can check that the we got unreadBadgeCount notif

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

desktop/src/push-notifications.js
31–33

This is no longer true when sending updateBadgeCount notifications. This will still show run on older clients, but it's just a console warning and only visible if you run the desktop app through a terminal.

ashoat added inline comments.
keyserver/src/push/send.js
1003

Can we delete this?

1025

Can we delete this?

This revision is now accepted and ready to land.Mar 17 2023, 11:24 AM

This diff seems to call getAPNsNotificationTopic with two parameters, but the version of that function in master only takes one parameter. Can you please update this diff's dependencies so I can see the rest of your stack? Please always set diff dependencies!

Separately, there are still two only for Flow lines in send.js – would be good to get rid of all of them!

Remove the remaining // only for flow lines

This diff seems to call getAPNsNotificationTopic with two parameters, but the version of that function in master only takes one parameter. Can you please update this diff's dependencies so I can see the rest of your stack? Please always set diff dependencies!

There's no stack for this diff, I'm calling getAPNsNotificationTopic with one argument, it's just an object with two fields.

This diff seems to call getAPNsNotificationTopic with two parameters, but the version of that function in master only takes one parameter. Can you please update this diff's dependencies so I can see the rest of your stack? Please always set diff dependencies!

There's no stack for this diff, I'm calling getAPNsNotificationTopic with one argument, it's just an object with two fields.

Oops!! Sorry for missing this and getting myself confused

Actually remove the remaining "only for flow" lines, not sure why this didn't commit before...