Commit graph

2,369 commits

Author SHA1 Message Date
ewin
3050c2930a
Don't pass processContentType the entire edit form, it doesn't need it 2025-03-06 09:49:37 -05:00
ewin
ac709a1205
Handle nil statuses in processContentType 2025-03-06 09:47:32 -05:00
ewin
5ecbda32af
Merge remote-tracking branch 'upstream/main' into fix/status-content-types 2025-03-05 19:01:06 -05:00
ewin
01e8c90f2e
one more swagger regen for the road 2025-03-05 18:37:37 -05:00
ewin
f55be91579
clean up the final diff a bit 2025-03-05 18:19:52 -05:00
ewin
187c5fdf23
Use omitempty consistently on API models 2025-03-05 18:19:38 -05:00
ewin
bdd9553ea8
Be explicit about this test status having an empty content type 2025-03-05 18:18:43 -05:00
ewin
75936b0c28
check for the correct value in the deletion test 2025-03-05 17:35:40 -05:00
ewin
11c1c837cc
Convert processContentType to free function and remove unused parameter 2025-03-05 17:35:10 -05:00
ewin
b2270e3092
Add test ensuring text and content type are returned when deleting a status 2025-03-05 17:27:28 -05:00
ewin
3872315db0
update other api tests with status content type field 2025-03-05 17:13:02 -05:00
ewin
9384f25dd9
Check content type of API statuses in all tests where text is checked 2025-03-05 16:35:07 -05:00
ewin
b6b0bd7ce7
Update new tests to check content type on API statuses 2025-03-05 16:24:53 -05:00
ewin
83de18aeba
Do include content type on status API model actually
This is mostly important when deleting and redrafting.

The comment on `apimodel.Status.Text` implies that it's not sent except in response to status deletion, but actually this doesn't seem to be the case; it also appears to be present in responses to creations and normal fetches and stuff. So I'm treating `ContentType` the same here.
2025-03-05 16:20:41 -05:00
ewin
f46583be48
Add test to ensure newly created statuses always have content type saved 2025-03-05 15:15:34 -05:00
ewin
8ef301c920
repurpose an existing test status instead of adding a new one to avoid breaking other tests 2025-03-05 14:59:14 -05:00
ewin
e02eb78cec
Add test for handling of statuses with no stored content type 2025-03-05 14:18:31 -05:00
ewin
921ba6481b
Return a value from processContentType instead of modifying the existing status
Fixes an issue that was caught by the test I just added - the recorded edit would be marked with the *new* content type instead of the old one, which is obviously bad
2025-03-05 13:19:39 -05:00
ewin
8634358278
Add test for updating content type in edits 2025-03-05 13:16:38 -05:00
tobi
69461c461b
[bugfix] Return useful err on server start failure (#3879)
* [bugfix] Return useful err on `server start` failure

* remove scheduler started func

* remove tryUntil
2025-03-05 19:12:53 +01:00
tobi
829143d263
[feature] Add token review / delete to backend + settings panel (#3845) 2025-03-04 10:01:25 +00:00
jade arson.
ee60732cf7
[chore] fixed email template to align with the new "Log in" button + separate page (#3871) 2025-03-04 09:46:33 +01:00
ewin
112e1d6c48
Revert change to StatusContentType swagger annotation
I'm going to include this in a follow-on PR instead.
2025-03-03 17:50:13 -05:00
ewin
1af504408b
Remove unused helper function I copied 2025-03-03 17:23:16 -05:00
ewin
92d363d028
Update StatusSource test 2025-03-03 17:19:51 -05:00
ewin
2ad5e077a7
We don't actually use ContentType on the API status model 2025-03-03 17:12:07 -05:00
ewin
9a60a9f1c2
Set ContentType in more places where Text is set 2025-03-03 17:11:43 -05:00
ewin
0969007c61
Update docs, take care of TODOs 2025-03-03 16:48:24 -05:00
ewin
cd53543ec1
ensure ContentType is updated anywhere Text is 2025-03-03 16:42:04 -05:00
ewin
8eeede9c35
Update API docs
go run github.com/go-swagger/go-swagger/cmd/swagger generate spec --scan-models --exclude-deps --output docs/api/swagger.yaml
2025-03-03 16:18:07 -05:00
ewin
32bc3ef023
Add migration 2025-03-03 15:14:29 -05:00
ewin
e51a787162
Write status content type on create/edit 2025-03-03 15:14:29 -05:00
ewin
49e649068c
Add helpers to convert between API/internal StatusContentType 2025-03-03 15:14:29 -05:00
ewin
da31c5c617
Add ContentType to API models StatusSource and StatusEdit 2025-03-03 15:14:29 -05:00
ewin
2791a9951f
Add ContentType to internal models 2025-03-03 15:14:28 -05:00
tobi
ab7ec43988
[bugfix] Fix app migration (#3868)
* [bugfix] Fix app migration

* use temporary index during migration

* create temporary index for the migration

* include local = true in temporary index

* tweak migration a bit for SPEED
2025-03-03 19:00:44 +01:00
kim
24da574684
[bugfix] fix refreshed additional media info being ignored (#3867)
* fix refreshed additional media info being ignored when force flag already set

* also update to always iterate through all additional info fields

* make similar changes for emoji, even if not necessary, just to keep in-sync
2025-03-03 16:14:27 +00:00
tobi
1b37944f8b
[feature] Refactor tokens, allow multiple app redirect_uris (#3849)
* [feature] Refactor tokens, allow multiple app redirect_uris

* move + tweak handlers a bit

* return error for unset oauth2.ClientStore funcs

* wrap UpdateToken with cache

* panic handling

* cheeky little time optimization

* unlock on error
2025-03-03 15:03:36 +00:00
kim
c80810eae8
bumps go-ffmpreg to v0.6.6 (#3866) 2025-03-03 10:51:30 +00:00
kim
67a2b3650c
bumps our uptrace/bun dependencies to v1.2.10 (#3865) 2025-03-03 10:42:05 +00:00
dependabot[bot]
ddd9210614
[chore]: Bump github.com/prometheus/client_golang from 1.20.5 to 1.21.0 (#3860)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.20.5 to 1.21.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.20.5...v1.21.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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-03-03 10:21:50 +00:00
kim
861b5cd920
bump our fork of modernc.org/sqlite to tag v1.36.0-concurrency-workaround (#3864) 2025-03-03 10:09:34 +00:00
dependabot[bot]
0e2e8e54ab
[chore]: Bump github.com/ncruces/go-sqlite3 from 0.23.0 to 0.24.0 (#3862)
Bumps [github.com/ncruces/go-sqlite3](https://github.com/ncruces/go-sqlite3) from 0.23.0 to 0.24.0.
- [Release notes](https://github.com/ncruces/go-sqlite3/releases)
- [Commits](https://github.com/ncruces/go-sqlite3/compare/v0.23.0...v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/ncruces/go-sqlite3
  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-03-03 09:51:42 +00:00
tobi
8488ac9286
[chore] migrate oauth2 -> codeberg (#3857) 2025-03-02 16:42:51 +01:00
tobi
49c12636c6
[chore] go-swagger -> codeberg (#3856) 2025-03-02 16:15:48 +01:00
tobi
d8bb1c391b
[chore] Update exif terminator version with codeberg libraries (#3855) 2025-03-02 15:44:02 +01:00
tobi
5d0e3d9c35
[chore] github.com/superseriousbusiness/httpsig -> codeberg.org/superseriousbusiness/httpsig (#3854) 2025-03-02 13:28:38 +01:00
tobi
e2e185d10b
[chore] github.com/superseriousbusiness/activity -> codeberg.org/superseriousbusiness/activity (#3853) 2025-03-02 12:48:00 +01:00
tobi
4c9901fc03
[chore] little frontend tweaks (#3852)
* [chore] little frontend tweaks

* beep boop

* poke

* clarify server time
2025-03-02 11:27:30 +01:00
Luca Matei Pintilie
e78e817057
[feature] add microformat support (#3848)
Related: #2959

Signed-off-by: Luca Matei Pintilie <luca@lucamatei.com>
2025-03-01 13:06:08 +01:00