Commit Graph

2456 Commits

Author SHA1 Message Date
Karina Kwiatek 5d6f9deb93 Handle missing services in share worker 2023-01-03 12:38:19 +01:00
Karina Kwiatek 35a3b6b87a Hide push notification prompt in inbox after accepting 2023-01-02 13:51:02 +01:00
Karina Kwiatek 05a8ef1797 Allow re-enabling push notifications after unsubscribing 2023-01-02 13:51:02 +01:00
Karina Kwiatek 1a29a19e9d Allow setting up push when service worker hasn't been registered yet.
We don't register the service worker until the user opts in for push notifications.
2023-01-02 13:51:02 +01:00
Karina Kwiatek cc1c262256
Merge pull request #678 from Retrospring/feature/webpush
WebPush support
2023-01-02 11:57:34 +00:00
Karina Kwiatek 04bc1da8cf Use Mute Rule use cases in mutes controller 2023-01-02 12:45:35 +01:00
Karina Kwiatek c20974d182 Appease the dog overlords
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 12:30:19 +01:00
Karina Kwiatek 48c7beb54e Only allow checking of own subscriptions 2023-01-02 11:52:02 +01:00
Karina Kwiatek 2417354b31 Unsubscribe client on too many failures 2023-01-02 11:52:02 +01:00
Karina Kwiatek efad76855e Add endpoint for checking subscription status 2023-01-02 11:52:02 +01:00
Karina Kwiatek e0195654b5 Send notification on 3 push failures 2023-01-02 11:52:00 +01:00
Karina Kwiatek fccf35fdab Restore push notification prompt in inbox 2023-01-02 11:51:46 +01:00
Karina Kwiatek 1cfd3250c0 Track failures on Web Push subscriptions 2023-01-02 11:51:46 +01:00
Karina Kwiatek 22a84ab818 Appease the dog overlords 2023-01-02 11:51:45 +01:00
Karina Kwiatek 2d6f539dfd Use author avatar on notification 2023-01-02 11:50:48 +01:00
Karina Kwiatek a67c26d985 Fix missing anon names from notification text 2023-01-02 11:50:48 +01:00
Karina Kwiatek 91d3db4034 Move rpush init/exit logic into Sidekiq initializer
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 11:50:48 +01:00
Karina Kwiatek 10c224b2fe Address review comments from @nilsding
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 11:50:48 +01:00
Karina Kwiatek 89008364d9 Handle push notifications in Sidekiq job 2023-01-02 11:50:48 +01:00
Karina Kwiatek 185c454da0 Fix incorrect author relationship name 2023-01-02 11:50:48 +01:00
Karina Kwiatek d9514a306a Make push notification settings reinit on navigation 2023-01-02 11:50:48 +01:00
Karina Kwiatek 3eafa5e335 Add tests for subscription management 2023-01-02 11:50:48 +01:00
Karina Kwiatek 8c2bfcb452 Use JSON for notification payload 2023-01-02 11:50:48 +01:00
Karina Kwiatek dc80c1dba3 Fix push notification settings not appearing when not subscribed 2023-01-02 11:50:48 +01:00
Karina Kwiatek 66b1dac3b9 Improve UX for push subscription management 2023-01-02 11:50:48 +01:00
Karina Kwiatek 8ff213af4e Add the ability to unsubscribe from push notifications 2023-01-02 11:50:48 +01:00
Karina Kwiatek 752cf1506b Add settings page for push notifications 2023-01-02 11:50:47 +01:00
Karina Kwiatek c8f5511a38 Fix capability classes being removed on page navigation
The body tag gets replaced by Turbo on page navigation, removing the classes.
2023-01-02 11:50:47 +01:00
Karina Kwiatek a04b290067 Appease the dog overlords 2023-01-02 11:50:47 +01:00
Karina Kwiatek 93d4af3f0d Deduplicate notification sending logic and replace placeholder string 2023-01-02 11:50:47 +01:00
Karina Kwiatek 2da4767623 Add JS for subscribing to and receiving push notifications 2023-01-02 11:50:47 +01:00
Karina Kwiatek 8b98c278da Send push notifications on question create 2023-01-02 11:50:47 +01:00
Karina Kwiatek bae227be76 Add endpoints for getting webpush public key and subscribing 2023-01-02 11:50:47 +01:00
Karina Kwiatek 32ab9267ec Add web push subscription model 2023-01-02 11:50:47 +01:00
Karina Kwiatek 4c158066cb Clean up User model 2023-01-02 11:31:27 +01:00
Karina Kwiatek 81c9870af4 Ignore Metrics/AbcSize in share worker 2023-01-02 09:46:55 +01:00
Karina Kwiatek 873d6a2c88 Fix typo in share worker 2023-01-02 09:46:55 +01:00
Karina Kwiatek 0241a02e29 Remove unnecessary `Object.const_get` 2023-01-02 09:35:32 +01:00
Karina Kwiatek 02bcfb3c9e Move user service into an instance variable
Co-authored-by: nilsding <nilsding@nilsding.org>
2023-01-02 09:34:08 +01:00
Karina Kwiatek d320a74045 Mark notification as read when visiting service settings 2023-01-02 00:01:42 +01:00
Karina Kwiatek baffd05d6f Appease the dog overlords 2023-01-01 23:52:46 +01:00
Karina Kwiatek 9d1e77aeba Revoke Twitter connection when the token is revoked 2023-01-01 23:46:10 +01:00
Andreas Nedbal 9b5470cfd3 Appease the dog overlords 2023-01-01 22:43:24 +01:00
Andreas Nedbal 7b0a615193 Validate uniqueness of answers for questions 2023-01-01 22:43:24 +01:00
Andreas Nedbal 6700a52ad1 Remove superfluous require 2023-01-01 22:42:50 +01:00
Andreas Nedbal 6a03d3587a Appease the dog overlords 2023-01-01 22:42:50 +01:00
Andreas Nedbal 0e172bb179 Add UI to manage muted users 2023-01-01 22:42:50 +01:00
Andreas Nedbal 55c473e0f5 don't create notifications from muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal 2a7a17a4c3 wip: don't create notifications from a muted user 2023-01-01 22:42:50 +01:00
Andreas Nedbal 8017d97784 Don't receive questions from muted users 2023-01-01 22:42:50 +01:00