gotosocial/internal/api/client
Vyr Cossont 5b765d734e
[feature] Push notifications (#3587)
* Update push subscription API model to be Mastodon 4.0 compatible

* Add webpush-go dependency

# Conflicts:
#	go.sum

* Single-row table for storing instance's VAPID key pair

* Generate VAPID key pair during startup

* Add VAPID public key to instance info API

* Return VAPID public key when registering an app

* Store Web Push subscriptions in DB

* Add Web Push sender (similar to email sender)

* Add no-op push senders to most processor tests

* Test Web Push notifications from workers

* Delete Web Push subscriptions when account is deleted

* Implement push subscription API

* Linter fixes

* Update Swagger

* Fix enum to int migration

* Fix GetVAPIDKeyPair

* Create web push subscriptions table with indexes

* Log Web Push server error messages

* Send instance URL as Web Push JWT subject

* Accept any 2xx code as a success

* Fix malformed VAPID sub claim

* Use packed notification flags

* Remove unused date columns

* Add notification type for update notifications

Not used yet

* Make GetVAPIDKeyPair idempotent

and remove PutVAPIDKeyPair

* Post-rebase fixes

* go mod tidy

* Special-case 400 errors other than 408/429

Most client errors should remove the subscription.

* Improve titles, trim body to reasonable length

* Disallow cleartext HTTP for Web Push servers

* Fix lint

* Remove redundant index on unique column

Also removes redundant unique and notnull tags on ID column since these are implied by pk

* Make realsender.go more readable

* Use Tobi's style for wrapping errors

* Restore treating all 5xx codes as temporary problems

* Always load target account settings

* Stub `policy` and `standard`

* webpush.Sender: take type converter as ctor param

* Move webpush.MockSender and noopSender into testrig
2025-01-23 16:47:30 -08:00
..
accounts [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
admin [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
announcements [chore] Stub /api/v1/announcements implementation (#3630) 2024-12-23 16:43:50 +01:00
apps [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
blocks [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
bookmarks [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
conversations [feature] Conversations API (#3013) 2024-07-23 20:44:31 +01:00
customemojis [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
exports [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
favourites [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
featuredtags [feature] Implement following hashtags (#3141) 2024-07-29 19:26:31 +01:00
filters [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
followedtags [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
followrequests [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
import [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
instance [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
interactionpolicies [feature] Allow users to submit interaction_policy on new statuses (#3314) 2024-09-18 16:35:35 +00:00
interactionrequests [feature] Interaction requests client api + settings panel (#3215) 2024-08-24 11:49:37 +02:00
lists [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
markers [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
media [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
mutes [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
notifications [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
polls [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
preferences [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
push [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
reports [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
search [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
statuses [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
streaming [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
tags [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
timelines [bugfix] Avoid empty public/local timeline queries (#2784) 2024-03-25 16:20:45 +00:00
user [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00