mirror of
1
Fork 0
Commit Graph

2355 Commits

Author SHA1 Message Date
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
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
dependabot[bot] a7485ae251
[chore]: Bump github.com/go-jose/go-jose/v4 from 4.0.2 to 4.0.5 (#3831)
Bumps [github.com/go-jose/go-jose/v4](https://github.com/go-jose/go-jose) from 4.0.2 to 4.0.5.
- [Release notes](https://github.com/go-jose/go-jose/releases)
- [Changelog](https://github.com/go-jose/go-jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/go-jose/go-jose/compare/v4.0.2...v4.0.5)

---
updated-dependencies:
- dependency-name: github.com/go-jose/go-jose/v4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-01 11:43:05 +01:00
CDN b4bb97225e
[feature/frontend] use localized time string in status & poll info page (#3821) 2025-03-01 11:41:32 +01:00
Xavier Vello 0118e03cda
[feature] Implement CSV import for mutes (#3696)
* Implement CSV import for mutes

* update swagger.yaml

* update documentation

* add ImportTestSuite.TestImportMutes

* fix comment typo
2025-03-01 11:37:40 +01:00
Vyr Cossont d73acc70d5
Document importing posts (#3844) 2025-02-28 16:10:16 -08:00
VirtualWolf 46862171e0
[feature] Added an extra CSS class name to the About This Instance and Register an Account sections in the root index template to allow for easier targeting with custom CSS. (#3843) 2025-02-27 10:26:55 +01:00
tobi 1f38b7b48f
[chore] Remove duplicate swagger docs build in Dockerfile (#3842)
* [chore] Use vendored swagger in Docker container

* skip the swagger step altogether actually, it's already done by goreleaser anyway
2025-02-26 21:12:26 +01:00
tobi 8bc502ba62
[chore] Update KimMachineGun/automemlimit (#3841) 2025-02-26 21:10:13 +01:00
tobi eb720241da
[feature] Enforce OAuth token scopes (#3835)
* move tokenauth to apiutil

* enforce scopes

* docs

* update test models, remove deprecated "follow"

* file header

* tests

* tweak scope matcher

* simplify...

* fix tests

* log user out of settings panel in case of oauth error
2025-02-26 13:04:55 +01:00
dependabot[bot] f734a94c1c
[chore]: Bump golang.org/x/crypto from 0.33.0 to 0.34.0 (#3824)
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.34.0.
- [Commits](https://github.com/golang/crypto/compare/v0.33.0...v0.34.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  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-02-25 12:48:37 +01:00
dependabot[bot] e1ec904dd3
[chore]: Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (#3826)
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.6.0 to 0.7.0.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.6.0...v0.7.0)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  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-02-25 12:48:22 +01:00
dependabot[bot] d2cf9de726
[chore]: Bump github.com/tetratelabs/wazero from 1.8.2 to 1.9.0 (#3827)
Bumps [github.com/tetratelabs/wazero](https://github.com/tetratelabs/wazero) from 1.8.2 to 1.9.0.
- [Release notes](https://github.com/tetratelabs/wazero/releases)
- [Commits](https://github.com/tetratelabs/wazero/compare/v1.8.2...v1.9.0)

---
updated-dependencies:
- dependency-name: github.com/tetratelabs/wazero
  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-02-25 12:48:02 +01:00
mkljczk 96d39155f2
[docs] Fix swagger operation descriptions (#3830)
* Fix swagger operation descriptions

Signed-off-by: mkljczk <git@mkljczk.pl>

* generate a swagger file

Signed-off-by: mkljczk <git@mkljczk.pl>

---------

Signed-off-by: mkljczk <git@mkljczk.pl>
2025-02-25 12:47:48 +01:00
Elliot Blackburn 1c049ba295
[docs] correct docker version format (#3832)
The documentation explains that the release tag is in the format of `vX.Y.Z` for container images. This does not appear to be correct when looking at the image tags in dockerhub. It seems the `v` prefix has been dropped at some point, or was never in place.
2025-02-25 12:47:07 +01:00
Privacy_Dragon d8f96f81d6
[chore] Fix typo in common.tsx (#3834) 2025-02-25 12:46:41 +01:00