Commit Graph

2258 Commits

Author SHA1 Message Date
Vyr Cossont
a8ae0e3173 Always load target account settings 2025-01-21 17:19:28 -08:00
Vyr Cossont
b982944e85 Restore treating all 5xx codes as temporary problems 2025-01-20 22:59:39 -08:00
Vyr Cossont
4f39da77bb Use Tobi's style for wrapping errors 2025-01-20 22:59:39 -08:00
Vyr Cossont
63ce52cbfa Make realsender.go more readable 2025-01-20 22:59:39 -08:00
Vyr Cossont
c1cc2a5217 Remove redundant index on unique column
Also removes redundant unique and notnull tags on ID column since these are implied by pk
2025-01-20 22:59:39 -08:00
Vyr Cossont
8542e8a7a3 Fix lint 2025-01-20 22:59:38 -08:00
Vyr Cossont
b0d0f8c0c6 Disallow cleartext HTTP for Web Push servers 2025-01-20 22:59:38 -08:00
Vyr Cossont
93aeadbd9f Improve titles, trim body to reasonable length 2025-01-20 22:59:38 -08:00
Vyr Cossont
13eda35985 Special-case 400 errors other than 408/429
Most client errors should remove the subscription.
2025-01-20 22:59:38 -08:00
Vyr Cossont
87d0229292 go mod tidy 2025-01-20 22:59:35 -08:00
Vyr Cossont
920ec76fd2 Post-rebase fixes 2025-01-20 22:59:00 -08:00
Vyr Cossont
bff26f4ebc Make GetVAPIDKeyPair idempotent
and remove PutVAPIDKeyPair
2025-01-20 22:59:00 -08:00
Vyr Cossont
9b8b3885bd Add notification type for update notifications
Not used yet
2025-01-20 22:59:00 -08:00
Vyr Cossont
bfc967f690 Remove unused date columns 2025-01-20 22:59:00 -08:00
Vyr Cossont
255833683f Use packed notification flags 2025-01-20 22:59:00 -08:00
Vyr Cossont
464d920cfd Fix malformed VAPID sub claim 2025-01-20 22:59:00 -08:00
Vyr Cossont
3a239fbe5a Accept any 2xx code as a success 2025-01-20 22:59:00 -08:00
Vyr Cossont
8ae57782ff Send instance URL as Web Push JWT subject 2025-01-20 22:59:00 -08:00
Vyr Cossont
23847f0e18 Log Web Push server error messages 2025-01-20 22:59:00 -08:00
Vyr Cossont
56a31656ef Create web push subscriptions table with indexes 2025-01-20 22:59:00 -08:00
Vyr Cossont
51113b8f27 Fix GetVAPIDKeyPair 2025-01-20 22:59:00 -08:00
Vyr Cossont
9f110a4af4 Fix enum to int migration 2025-01-20 22:59:00 -08:00
Vyr Cossont
26d99209a9 Update Swagger 2025-01-20 22:59:00 -08:00
Vyr Cossont
2cb7a8bf2a Linter fixes 2025-01-20 22:59:00 -08:00
Vyr Cossont
8b9a228ea2 Implement push subscription API 2025-01-20 22:59:00 -08:00
Vyr Cossont
1fe29c7c43 Delete Web Push subscriptions when account is deleted 2025-01-20 22:58:59 -08:00
Vyr Cossont
8e72a8fd24 Test Web Push notifications from workers 2025-01-20 22:58:59 -08:00
Vyr Cossont
c9aa25b42b Add no-op push senders to most processor tests 2025-01-20 22:58:59 -08:00
Vyr Cossont
0c92f9f0f3 Add Web Push sender (similar to email sender) 2025-01-20 22:58:59 -08:00
Vyr Cossont
0cffb8784e Store Web Push subscriptions in DB 2025-01-20 22:58:59 -08:00
Vyr Cossont
db2ba34630 Return VAPID public key when registering an app 2025-01-20 22:58:59 -08:00
Vyr Cossont
86fcc61879 Add VAPID public key to instance info API 2025-01-20 22:58:59 -08:00
Vyr Cossont
821c1da688 Generate VAPID key pair during startup 2025-01-20 22:58:59 -08:00
Vyr Cossont
7a02a19c3c Single-row table for storing instance's VAPID key pair 2025-01-20 22:58:59 -08:00
Vyr Cossont
c4012b6f15 Add webpush-go dependency
# Conflicts:
#	go.sum
2025-01-20 22:58:59 -08:00
Vyr Cossont
f62859b61a Update push subscription API model to be Mastodon 4.0 compatible 2025-01-20 22:58:59 -08:00
dependabot[bot]
5c0514e83c
[chore]: Bump github.com/coreos/go-oidc/v3 from 3.11.0 to 3.12.0 (#3662) 2025-01-20 10:15:27 +00:00
tobi
37fd7c7a6a
[bugfix] Store LastModified for domain perm subs + send as If-Modified-Since (#3655) 2025-01-20 10:56:00 +01:00
dependabot[bot]
9835d3e65d
[chore]: Bump github.com/gin-contrib/cors from 1.7.2 to 1.7.3 (#3661) 2025-01-20 09:47:07 +00:00
dependabot[bot]
77ea30542b
[chore]: Bump golang.org/x/net from 0.33.0 to 0.34.0 (#3660) 2025-01-20 09:03:10 +00:00
dependabot[bot]
cfe6ac5a42
[chore]: Bump github.com/jackc/pgx/v5 from 5.7.1 to 5.7.2 (#3663)
Bumps [github.com/jackc/pgx/v5](https://github.com/jackc/pgx) from 5.7.1 to 5.7.2.
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v5.7.1...v5.7.2)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 10:01:46 +01:00
dependabot[bot]
0096222c0e
[chore]: Bump github.com/gin-contrib/sessions from 1.0.1 to 1.0.2 (#3664)
Bumps [github.com/gin-contrib/sessions](https://github.com/gin-contrib/sessions) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/gin-contrib/sessions/releases)
- [Changelog](https://github.com/gin-contrib/sessions/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/sessions/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/sessions
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-20 10:01:17 +01:00
tobi
634d4f408f
[bugfix] Fix existing perm adoption (#3651)
* [bugfix] Fix existing perm adoption

* go fmt

* test, small log fix
2025-01-18 18:55:27 +01:00
kim
81b66ad7e3
update ncruces/go-sqlite3 v0.21.3 -> v0.22.0, gruf/go-ffmpreg v0.6.4 -> v0.6.5 (#3646) 2025-01-14 18:30:55 +00:00
kim
b8ef9fc4bc
bump uptrace/bun dependencies from 1.2.6 to 1.2.8 (#3645) 2025-01-14 14:23:28 +00:00
kim
e77c7e16b6
[chore] better dns validation (#3644)
* add seperate PunifyValidate() function for properly validating domain names when converting to punycode

* rename function, strip port from domain validation
2025-01-14 14:23:18 +00:00
dependabot[bot]
b95498b8c2
[chore]: Bump mvdan.cc/xurls/v2 from 2.5.0 to 2.6.0 (#3643)
Bumps [mvdan.cc/xurls/v2](https://github.com/mvdan/xurls) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/mvdan/xurls/releases)
- [Commits](https://github.com/mvdan/xurls/compare/v2.5.0...v2.6.0)

---
updated-dependencies:
- dependency-name: mvdan.cc/xurls/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 13:11:20 +00:00
dependabot[bot]
4d423102c1
[chore]: Bump github.com/gin-contrib/gzip from 1.0.1 to 1.1.0 (#3639)
Bumps [github.com/gin-contrib/gzip](https://github.com/gin-contrib/gzip) from 1.0.1 to 1.1.0.
- [Release notes](https://github.com/gin-contrib/gzip/releases)
- [Changelog](https://github.com/gin-contrib/gzip/blob/master/.goreleaser.yaml)
- [Commits](https://github.com/gin-contrib/gzip/compare/v1.0.1...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/gin-contrib/gzip
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-01-14 13:10:39 +00:00
kim
8cfae010a9
[bugfix] migration to cleanup dropped status edits (#3637)
* add migration to cleanup dropped status edits from previous bug, relinking with statuses

* don't use bun.Ident where not needed

* fix join statement

* fix query to work for both postgres and sqlite

* actually update by the currently set status ID field 🤦
2025-01-09 00:02:22 +00:00
tobi
8daa4dae34
[bugfix] More permissive CSV parsing for perm subs, text parse fix (#3638)
* [bugfix] More permissive CSV parsing for perm subs, text parse fix

* wee

* change the way dry works, slightly

* me oh my, i'm just a little guy

* we're just normal men
2025-01-08 22:38:27 +01:00