gotosocial/internal/api/client/accounts
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
..
account_test.go [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
accountalias.go [feature] Account alias / move API + db models (#2518) 2024-01-16 16:22:44 +00:00
accountcreate.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
accountcreate_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
accountdelete.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
accountdelete_test.go [feature] Allow import of following and blocks via CSV (#3150) 2024-08-02 12:41:46 +01:00
accountget.go [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
accountget_test.go [feature] Implement Mastodon-compatible roles (#3136) 2024-07-31 09:26:09 -07:00
accountmove.go [chore] Expose move endpoint again, small settings panel fixes (#2752) 2024-03-13 14:45:50 +01:00
accounts.go [chore] stub /api/v1/accounts/{id}/featured_tags endpoint (#3598) 2024-12-08 13:47:07 +01:00
accountupdate.go [feature/frontend] Add options to include Unlisted posts or hide all posts (#3272) 2024-09-09 18:07:25 +02:00
accountupdate_test.go [feature] Allow import of following and blocks via CSV (#3150) 2024-08-02 12:41:46 +01:00
accountverify.go [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
accountverify_test.go [feature] add support for receiving federated status edits (#3597) 2024-12-05 13:35:07 +00:00
block.go [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
block_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
featuredtags.go [chore] stub /api/v1/accounts/{id}/featured_tags endpoint (#3598) 2024-12-08 13:47:07 +01:00
follow.go [feature] Process outgoing Move from clientAPI (#2750) 2024-03-13 13:53:29 +01:00
follow_test.go [bugfix] further paging mishaps (#2884) 2024-04-30 16:22:23 +02:00
followers.go [feature] Option to hide followers/following (#2788) 2024-04-02 10:42:24 +01:00
following.go [feature] Option to hide followers/following (#2788) 2024-04-02 10:42:24 +01:00
lists.go [feature] User-selectable preset CSS themes for accounts (#2777) 2024-03-25 17:32:24 +00:00
lists_test.go [feature] Implement exclusive lists (#3280) 2024-09-09 15:56:58 -07:00
lookup.go [feature] Process outgoing Move from clientAPI (#2750) 2024-03-13 13:53:29 +01:00
mute.go [bugfix] Fix setting immediate expires_at value on filter endpoints (#3513) 2024-11-05 13:29:51 +01:00
mute_test.go [feature] User muting (#2960) 2024-06-06 16:38:02 +00:00
note.go [feature] Process outgoing Move from clientAPI (#2750) 2024-03-13 13:53:29 +01:00
profile.go [feature] Implement profile API (#2926) 2024-05-29 12:57:44 +02:00
profile_test.go [chore/frontend] Use smaller webp images for logo and default avatars (#3119) 2024-07-20 14:02:22 +01:00
relationships.go [chore] Swagger: correct names and formats for several array params (#2758) 2024-03-15 11:31:58 +01:00
search.go [feature] Process outgoing Move from clientAPI (#2750) 2024-03-13 13:53:29 +01:00
search_test.go [bugfix] Rework MultiError to wrap + unwrap errors properly (#2057) 2023-08-02 17:21:46 +02:00
statuses.go [feature] User-selectable preset CSS themes for accounts (#2777) 2024-03-25 17:32:24 +00:00
statuses_test.go [bugfix] visibility after implicit approval not getting invalidated (#3370) 2024-09-28 22:47:46 +02:00
themesget.go [feature] User-selectable preset CSS themes for accounts (#2777) 2024-03-25 17:32:24 +00:00
unblock.go [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
unfollow.go [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
unmute.go [feature] User muting (#2960) 2024-06-06 16:38:02 +00:00
unmute_test.go [feature] User muting (#2960) 2024-06-06 16:38:02 +00:00