gotosocial/internal/api/model
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.go [feature] Add image descriptions for default avatar + header; don't allow editing default desc (#3473) 2024-10-21 14:04:50 +02:00
admin.go [feature/frontend] Let admins send test email to validate SMTP config (#2934) 2024-05-27 17:03:54 +00:00
announcement.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
announcementreaction.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
application.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
attachment.go [feature] add support for clients editing statuses and fetching status revision history (#3628) 2024-12-23 17:54:44 +00:00
block.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
card.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
content.go [feature] add support for receiving federated status edits (#3597) 2024-12-05 13:35:07 +00:00
conversation.go [bugfix] Include own account in conversation when no other accounts involved (#3387) 2024-10-04 19:22:52 +02:00
domain.go [feature] Create/update/remove domain permission subscriptions (#3623) 2025-01-05 13:20:33 +01:00
emoji.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
emojicategory.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
exportimport.go [feature] Allow import of following and blocks via CSV (#3150) 2024-08-02 12:41:46 +01:00
featuredtag.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
field.go [feature] Enable federation in/out of profile PropertyValue fields (#1722) 2023-05-09 11:16:10 +01:00
filter.go [feature] Filters v1 (#2594) 2024-03-06 11:15:58 +01:00
filterresult.go feature: filters v2 server-side warning/hiding (#2793) 2024-05-06 12:49:08 +01:00
filterv1.go [bugfix] Allow unsetting filter expiration dates (#3560) 2024-11-26 08:23:00 -08:00
filterv2.go [bugfix] Allow unsetting filter expiration dates (#3560) 2024-11-26 08:23:00 -08:00
headerfilter.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
history.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
instance.go [feature] Add global instance CSS customization setting (#3352) 2024-12-02 12:24:48 +01:00
instancev1.go [feature] Add global instance CSS customization setting (#3352) 2024-12-02 12:24:48 +01:00
instancev2.go [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
interaction.go [feature] Interaction requests client api + settings panel (#3215) 2024-08-24 11:49:37 +02:00
interactionpolicy.go [feature] Allow users to set default interaction policies per status visibility (#3108) 2024-07-17 16:46:52 +02:00
list.go [feature] Implement exclusive lists (#3280) 2024-09-09 15:56:58 -07:00
marker.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
mention.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
multistatus.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
notification.go [feature] New user sign-up via web page (#2796) 2024-04-11 11:45:53 +02:00
nullable.go [bugfix] Allow unsetting filter expiration dates (#3560) 2024-11-26 08:23:00 -08:00
oauth.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
paging.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
poll.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
preferences.go [feature] Implement the preferences client API (#1740) 2023-05-06 17:42:58 +02:00
relationship.go [feature] Add requested_by to relationship model (#2672) 2024-02-20 17:50:54 +00:00
report.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
results.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
rule.go [bugfix] Fix Swagger spec and add test script (#2698) 2024-03-06 18:05:45 +01:00
scheduledstatus.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
search.go [feature] Add from: search operator and account_id query param (#2943) 2024-05-31 12:57:42 +02:00
source.go [feature/frontend] Add options to include Unlisted posts or hide all posts (#3272) 2024-09-09 18:07:25 +02:00
status.go [feature] add support for clients editing statuses and fetching status revision history (#3628) 2024-12-23 17:54:44 +00:00
statuscontext.go [chore/frontend] Tweak threading a bit, inform about hidden replies (#3097) 2024-07-13 12:26:16 +02:00
tag.go [feature] Implement following hashtags (#3141) 2024-07-29 19:26:31 +01:00
theme.go [feature] User-selectable preset CSS themes for accounts (#2777) 2024-03-25 17:32:24 +00:00
token.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
user.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
usermute.go [feature] User muting (#2960) 2024-06-06 16:38:02 +00:00
webpushnotification.go [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
webpushsubscription.go [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
well-known.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00