gotosocial/internal/processing/admin
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] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
accountaction.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
accountget.go [feature] Admin accounts endpoints; approve/reject sign-ups (#2826) 2024-04-13 13:25:10 +02:00
accounts.go [feature] Page through accounts as moderator (#2881) 2024-05-01 14:11:22 +01:00
admin.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
admin_test.go [feature] Push notifications (#3587) 2025-01-23 16:47:30 -08:00
debug_apurl.go [chore] media and emoji refactoring (#3000) 2024-06-26 16:01:16 +01:00
domainallow.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
domainblock.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
domainkeysexpire.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
domainpermission.go [feature] Add domain permission drafts and excludes (#3547) 2024-11-21 13:09:58 +00:00
domainpermission_test.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
domainpermissiondraft.go [feature] Add domain permission drafts and excludes (#3547) 2024-11-21 13:09:58 +00:00
domainpermissionexclude.go [feature] Add domain permission drafts and excludes (#3547) 2024-11-21 13:09:58 +00:00
domainpermissionsubscription.go [bugfix] More permissive CSV parsing for perm subs, text parse fix (#3638) 2025-01-08 22:38:27 +01:00
email.go [chore] media and emoji refactoring (#3000) 2024-06-26 16:01:16 +01:00
emoji.go [chore] Upgrade golangci-lint, ignore existing int overflow warnings (#3420) 2024-10-16 14:13:58 +02:00
emoji_test.go [bugfix] Fix Postgres emoji delete, emoji category change (#2570) 2024-01-29 14:57:22 +00:00
headerfilter.go [feature] request blocking by http headers (#2409) 2023-12-18 14:18:25 +00:00
media.go [feature] support processing of (many) more media types (#3090) 2024-07-12 09:39:47 +00:00
report.go [performance] cache more database calls, reduce required database calls overall (#3290) 2024-09-16 16:46:09 +00:00
rule.go [feature] add support for clients editing statuses and fetching status revision history (#3628) 2024-12-23 17:54:44 +00:00
signupapprove.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
signupapprove_test.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
signupreject.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
signupreject_test.go [feature] Self-serve email change for users (#2957) 2024-06-06 14:43:25 +01:00
util.go [feature] Fetch + create domain permissions from subscriptions nightly (#3635) 2025-01-08 11:29:40 +01:00
workertask.go [feature] persist worker queues to db (#3042) 2024-07-30 13:58:31 +02:00
workertask_test.go [feature] persist worker queues to db (#3042) 2024-07-30 13:58:31 +02:00