summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFiles
8 days[feat] utilize system's libsqlite3HEADtrunknextLibravatar Terin Stock6
Add support for using the system's libsqlite3 library by adding a driver using "github.com/mattn/go-sqlite3".
8 days[chore] remove vendorLibravatar Terin Stock8215
8 days[chore] update URLs to forked sourceLibravatar Terin Stock3
To satisfy the requirements of the AGPL v3 license used by GoToSocial, I must update the URLs provided by the server to point at this forked repository, and I must do so before making the server available over any network.
2025-11-17[chore] Go back to using `name` for attachment alt text for now, add note in ↵v0.20.2Libravatar tobi4
docs (#4559) # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This pull request switches us back to using the `name` property instead of the `summary` property for media descriptions for now, as using `summary` was causing accessibility issues with folks on *key, *oma, and Iceshrimp instances not being able to see GtS alt text, as those softwares (as of their latest releases I think) only look for `name`. Also updates the docs to add a note there on our intention to switch to using the HTML `summary` property instead of / in addition to `name` from v0.21.0 onwards. closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4524 ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4559 Reviewed-by: Daenney <daenney@noreply.codeberg.org> Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-11-17[feature] Implement stub `authorize_interaction` route (#4557)Libravatar Kevin Gimbel3
Updates #4548 # Description This PR implements a route for the `/authorize_interaction` endpoint. This endpoint is used when an interaction request comes from a remote Mastodon instance, e.g. when a user clicks on the reply button and enters their GoToSocial server address into the field. closes #4548 ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4557 Co-authored-by: Kevin Gimbel <kevin@gimbel.dev> Co-committed-by: Kevin Gimbel <kevin@gimbel.dev>
2025-11-17[bugfix] Add Swagger docs for the user:notification stream (#4555)Libravatar Vyr Cossont2
# Description Documents the `user:notification` stream, which was missing from API docs. Also notes that the `user` stream includes notifications as well. - Fixes #4340 ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [ ] I/we have performed a self-review of added code. - [ ] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4555 Co-authored-by: Vyr Cossont <vyr@noreply.codeberg.org> Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
2025-11-17[bugfix] Fix async-emoji-loading (#4553)Libravatar kim1
Fixes emoji async loading by having placeholder emojis return a path that correctly resolves to the correct emoji with our HTTP routing (due to a quirk in which we ignore the path extension). This ensures the emoji gets correctly resolved, and if necessary will block until it has been loaded by ProcessingEmoji{}. In some sense it is quite hacky, but also quite elegant in how it relies on existing lock structures we already had in place to block on load without needing to stream emoji model changes to websocket APIs. closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4529 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4553 Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org> Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[bugfix] Add Swagger docs for blur filter action (#4551)Libravatar Vyr Cossont5
- Introduced by #4371 - Fixes #4445 @mkljczk: first off, thanks for adding blur filter support! Second, when updating the client API, please update the Swagger doc comments as well. Let me know if you have questions about the Swagger gunk in the future; I use it to generate the API client for `slurp` so I've touched it a bunch. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4551 Co-authored-by: Vyr Cossont <vyr@noreply.codeberg.org> Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
2025-11-17[bugfix] update go-mmap to macOS-compatible version (#4550)Libravatar Vyr Cossont5
- Fixes #4549 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4550 Co-authored-by: Vyr Cossont <vyr@noreply.codeberg.org> Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
2025-11-17[chore] Apply schema for OpenAPI errors (#4511)Libravatar Vyr Cossont211
Adds an error struct to Swagger covering normal and OAuth errors for client API endpoints. Now clients using Swagger codegen can handle errors. Specifically, if you _don't_ have typed errors in your Swagger IDL and you're using `go-swagger` to generate your API client, the error message is discarded and you are only told the status code. With this change in place, clients like `slurp` can tell the user that they tried to upload an emoji that was too big or whatever. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4511 Reviewed-by: tobi <kipvandenbos@noreply.codeberg.org> Co-authored-by: Vyr Cossont <vyr@noreply.codeberg.org> Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
2025-11-17[performance] remove hard reliance on .Cached field to indicate whether ↵Libravatar kim6
media / emoji is cached (#4545) This removes our hard reliance on the `.Cached` field of media and emojis to determine whether it exists in storage. We still make use of it as a useful flag to know whether to even bother checking storage, but we ultimately rely on the `ErrNotFound` response of storage to determine whether the media exists and needs recaching. This now removes our hard reliance on performing the `FixCacheStatus()` cleanup operations for media and emojis, which should reduce a whole bunch of S3 storage driver calls (thus, reducing cost for metered S3 buckets). Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4545 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] update dependencies (#4547)Libravatar kim77
- codeberg.org/gruf/go-ffmpreg: v0.6.12 -> v0.6.14 - github.com/ncruces/go-sqlite3: v0.30.0 -> v0.30.1 - github.com/wazero/wazero: v1.9.0 -> v1.10.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4547 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[performance] add optional S3 object info caching (#4546)Libravatar kim15
This adds an optional S3 object info cache to the S3 storage driver backend (see [here](https://codeberg.org/gruf/go-storage/releases/tag/v0.4.0)) to reduce S3 calls largely during media cleanup operations, but it should also help in other situations cutting back on S3 calls when for example a key is already known to not exist. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4546 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] update dependencies (#4542)Libravatar kim111
- github.com/minio/minio-go/v7: v7.0.95 -> v7.0.97 - github.com/ncruces/go-sqlite3: v0.29.1 -> v0.30.0 - github.com/tdewolff/minify/v2: v2.24.5 -> v2.24.6 - codeberg.org/gruf/go-mmap: fixes build for BSD platforms Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4542 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[performance] when transforming media, perform read operations of large ↵Libravatar kim11
files using mmap (#4541) the performance gains aren't as substantial as i was hoping, but benchmarks did show it averaged out faster using this method. unfortunately i managed to lose the benchmarks i wrote with a poorly timed `git checkout -- .` 😭 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4541 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[bugfix] more RSS validation issues (#4517)Libravatar kim21
Fixes some validation issues relating to author information often expected to be valid email addresses, which our @displayname@username is not. There's still a few more validation issues, but honestly if we're going have better support I think it might be worth dropping gorilla/feeds for our own tagged XML / JSON structs. Also does a bunch of housekeeping in the typeutils package removing error returns where never used / only ever logged, removing unused contexts etc. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4517 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[bugfix] Fix invalid period parameter when generating the TOTP URL (#4536)Libravatar TwizzyDizzy1
# Description This MR removes the time unit `s` (for seconds) from the `period` parameter in the TOTP URL. closes #4535 ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Co-authored-by: gruf <gruf@noreply.codeberg.org> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4536 Co-authored-by: TwizzyDizzy <codeberg@thomasdalichow.de> Co-committed-by: TwizzyDizzy <codeberg@thomasdalichow.de>
2025-11-17[chore] update dependencies (#4539)Libravatar kim149
- github.com/KimMachineGun/automemlimit: v0.7.4 -> v0.7.5 - github.com/tdewolff/minify/v2: v2.24.4 -> v2.24.5 - modernc.org/sqlite: v1.39.1 -> v1.40.0 w/ concurrency workaround - github.com/go-swagger/go-swagger: v0.32.3 -> v0.33.1 (and drops use of our custom fork now the fix is available upstream) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4539 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] add a 'nos3' build tag to support compiling without S3 storage ↵Libravatar kim4
support (#4522) on amd64 this reduces binary size from 75M (compiled with `'nootel'`) down to 73M (compiled with `'nootel nos3'`) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4522 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] add a 'nosqlite' and 'nopostgres' build tags to support compiling ↵Libravatar kim6
without certain database support (#4523) following on from previous PRs, this is all in the name of reducing binary size! compiling with `nosqlite` nets a saving of ~2M, and compiling with `nopostgres` nets a saving of ~4M Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4523 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] reduce binary size (#4519)Libravatar kim1
- sets the nomsgpack build tag to instruct gin to build without msgpack support (which we don't use, anyway) - sets the stdlibjson build tag to instruct minio to use the stdlib JSON encoder / decoder instead of goccy/json both of the above net a size decrease of ~7MB Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4519 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore/frontend] Use `autocomplete="one-time-code"` for 2fa input (#4516)Libravatar tobi1
# Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. Should make things a bit easier for password managers etc. See https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/autocomplete#one-time-code ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4516 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-11-17[chore] fix typo in web push notification title (#4514)Libravatar nicole mikołajczyk1
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl> # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This pull request implements xyz or fixes abc. closes #(issue) closes #(another issue) ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [ ] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4514 Co-authored-by: nicole mikołajczyk <git@mkljczk.pl> Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
2025-11-17[performance] reduce account stats database calls (#4496)Libravatar kim9
Reduces both code complexity and the number of separate database transactions we need to make by moving account statistics operations into the database as side-effects of the operations that effect them. In contrast to currently, where we manually update account statistics at the application layer. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4496 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[chore] update dependencies (#4507)Libravatar kim17
- codeberg.org/gruf/go-runners: v1.6.3 -> v1.7.0 - codeberg.org/gruf/go-sched: v1.2.4 -> v1.3.0 - github.com/tdewolff/minify/v2: v2.24.3 -> v2.24.4 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4507 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[bugfix] recheck for just-processed-emoji within mutex lock before starting ↵Libravatar kim1
processing (#4505) # Description This should fix the recent 'already exists' errors appearing, surfaced after the async emoji API change. ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4505 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[performance] pull in latest httpsig with performance enhancements and ↵Libravatar kim10
bugfixes (#4500) code.supseriousbusiness.org/httpsig: v1.4.0 -> v1.5.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4500 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-11-17[performance] handle emoji refreshes asynchronously when fetched as part of ↵Libravatar kim5
account|status dereferences (#4486) # Description Updates our dereferencer emoji handling to work asynchronously when going through the route of account or status dereferencing. closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4485 ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [ ] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4486 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-17[chore] Better handling of Gone accounts during `PostInbox` (return 202 ↵v0.20.1Libravatar tobi2
Accepted instead of 401 Unauthorized) (#4506) Follow up of https://codeberg.org/superseriousbusiness/gotosocial/pulls/4503 addressing something I missed! Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4506 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[chore] Rationalize HTTP return codes for fedi endpoints, other tidying up ↵Libravatar tobi35
(#4503) # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This pull request does some refactoring of the fedi API endpoints and processing functions, and the authenticate + pub key deref functions, to try to return fewer silly HTTP codes like 410 Gone (when a *remote* account is gone, not a local one), and 500 errors where something isn't really an error. Also does some general tidying up and renaming for consistency. ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4503 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[bugfix] Fix HTTP return code for Likes of remote statuses (#4504)Libravatar tobi1
# Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4492 by golly gosh!!! ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4504 Reviewed-by: kim <gruf@noreply.codeberg.org> Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[performance] cache account IDs in home timeline query not in exclusive ↵Libravatar kim9
lists (#4502) this caches the stage of the home timeline query in which we calculate which account IDs should be shown in a particular user's timeline. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4502 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-17[chore/performance] Use CTE for list select statuses query (#4501)Libravatar tobi2
# Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This PR changes the list select query to use (potentially cached) account IDs provided in a CTE, rather than using a subquery that joins on the follows table. This should be a little faster! ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [x] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4501 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[bugfix] rss feed validation (#4499)Libravatar kim2
without those final `.FeedXml()` calls the feed objects weren't getting wrapped in the required top-level object with the XML namespace definition Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4499 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-17[feature] granular admin scopes for custom emojis (#4489)Libravatar Vyr Cossont11
This PR adds admin equivalents of the `read:custom_emojis` OAuth scope: `admin:read:custom_emojis` and `admin:write:custom_emojis`. This is so tools which only touch emojis can run without other admin permissions. (`slurp emojis import` is one such tool.) I've also sorted the admin section of the scopes lists alphabetically like the non-admin section, and updated the Swagger test script to print the same command path that it actually runs. ## API compatibility Neither [Mastodon](https://docs.joinmastodon.org/api/oauth-scopes/) nor Akkoma nor Iceshrimp.NET has an equivalent scope, so there are no alternate scope names to worry about. Co-authored-by: tobi <tobi.smethurst@protonmail.com> Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4489 Co-authored-by: Vyr Cossont <vyr@noreply.codeberg.org> Co-committed-by: Vyr Cossont <vyr@noreply.codeberg.org>
2025-10-17[docs] Document setting `OTEL_EXPORTER_PROMETHEUS_HOST` for Docker (#4498)Libravatar tobi2
Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4493 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4498 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[bugfix] Fix "client IP could not be parsed" error msg (#4497)Libravatar tobi1
Fix missing warn log param. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4497 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-17[chore] update dependencies (#4495)Libravatar kim336
- github.com/coreos/go-oidc/v3: v3.15.0 -> v3.16.0 - github.com/go-playground/form/v4: v4.2.1 -> v4.3.0 - github.com/go-swagger/go-swagger: v0.32.3 -> v0.33.1 - golang.org/x/crypto: v0.42.0 -> v0.43.0 - golang.org/x/image: v0.31.0 -> v0.32.0 - golang.org/x/net: v0.45.0 -> v0.46.0 - golang.org/x/oauth2: v0.31.0 -> v0.32.0 - golang.org/x/sys: v0.36.0 -> v0.37.0 - golang.org/x/text: v0.29.0 -> v0.30.0 - modernc.org/sqlite: v1.39.0 -> v1.39.1 (w/ concurrency workaround) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4495 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-17[bugfix] repeated posts on timeline endpoints (#4494)Libravatar kim5
- updates the go-structr library to add support for getting the current HEAD and TAIL primary key values, which allows us to not insert statuses if they're older than the current oldest timeline item - ensures the nextPg parameters get updated after loading from the cache before then performing a database query closes: https://codeberg.org/superseriousbusiness/gotosocial/issues/4491 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4494 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-08[performance] add benchmarks for native Go imaging code, small tweaks to ↵v0.20.0Libravatar kim3
reduce nil and boundary checks, some loop unrolling (#4482) Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4482 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-07[bugfix] Log a warning when clientIP could not be parsed during rate ↵Libravatar tobi1
limiting (#4481) # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. Fixes a panic when clientIP cannot be parsed in the rate limiting middleware, and warn logs the derived clientIP and a hint that reverse proxy may be misconfigured. Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4479 ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4481 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-06[bugfix] Fix `db error checking for int req: sql: no rows in result set` (#4478)v0.20.0-rc4Libravatar tobi1
Fixes `sql: no rows in result set` when trying to append approvedByURI to a reply that was sent impolitely and approved impolitely. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4478 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-06[bugfix] Fix nil ptr in `DifferentFrom` func (#4477)Libravatar tobi1
Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4476 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4477 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-05[docs] Add db migration tip for slow hardware instances. (#4457)v0.20.0-rc2Libravatar Daniël Franke2
This PR adds a new section to the documentation to contain workarounds for running GtS on slow hardware. Right now it only contains a procedure on how to run migrations on a different database instance in case the original database is too slow to finish a database migration in a timely manner. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4457 Co-authored-by: Daniël Franke <df@ponc.tech> Co-committed-by: Daniël Franke <df@ponc.tech>
2025-10-05[bugfix] Update interaction policies of freshly dereffed statuses if ↵Libravatar tobi2
different from last deref (#4474) # Description > If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements. > > If this is a documentation change, please briefly describe what you've changed and why. This pull request adds a check to see whether interaction policy on a refreshed status is different from the interaction policy set on that status before, and updates the status with the new policy if it's changed. Should fix a pesky issue where folks on v0.19.2 and above still can't interact with statuses they dereferenced before updating. ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4474 Reviewed-by: kim <gruf@noreply.codeberg.org> Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-03[bugfix] status refresh race condition causing double edit notifications (#4470)Libravatar kim2
# Description fixes possible race condition of existing status being out-of-date in enrichStatus() ## Checklist - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [x] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [x] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4470 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-03[chore] update dependencies (#4468)Libravatar kim32
- github.com/ncruces/go-sqlite3 - codeberg.org/gruf/go-mempool - codeberg.org/gruf/go-structr (changes related on the above) * - codeberg.org/gruf/go-mutexes (changes related on the above) * * this is largely just fiddling around with package internals in structr and mutexes to rely on changes in mempool, which added a new concurrency-safe pool Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4468 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
2025-10-03[chore] Use bulk updates + fewer loops in status rethreading migration (#4459)Libravatar tobi7
This pull request tries to optimize our status rethreading migration by using bulk updates + avoiding unnecessary writes, and doing the migration in one top-level loop and one stragglers loop, without the extra loop to copy thread_id over. On my machine it runs at about 2400 rows per second on Postgres, now, and about 9000 rows per second on SQLite. Tried *many* different ways of doing this, with and without temporary indexes, with different batch and transaction sizes, etc., and this seems to be just about the most performant way of getting stuff done. With the changes, a few minutes have been shaved off migration time testing on my development machine. *Hopefully* this will translate to more time shaved off when running on a vps with slower read/write speed and less processor power. SQLite before: ``` real 20m58,446s user 16m26,635s sys 5m53,648s ``` SQLite after: ``` real 14m25,435s user 12m47,449s sys 2m27,898s ``` Postgres before: ``` real 28m25,307s user 3m40,005s sys 4m45,018s ``` Postgres after: ``` real 22m31,999s user 3m46,674s sys 4m39,592s ``` Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4459 Co-authored-by: tobi <tobi.smethurst@protonmail.com> Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-10-01[bugfix/frontend] restore blockquote “block” margin (#4465)Libravatar Zoë Bijl1
stripping `<blockquote>` of all the margin looks a bit funky. this only removes the inline margin. in English this generally means that it won’t have horizontal margin but will still have vertical margin. Closes #4466 ![before the change any content after the blockquote is flush against it without space](/attachments/7cc808ee-a999-435d-9235-60651a3d9bca) ![after the changes there is vertical rhythm](/attachments/3240480a-14ee-4739-a497-14237879993c) ## Checklist Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]` If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want). - [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md). - [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat. - [x] I/we have not leveraged AI to create the proposed changes. - [x] I/we have performed a self-review of added code. - [x] I/we have written code that is legible and maintainable by others. - [ ] I/we have commented the added code, particularly in hard-to-understand areas. - [ ] I/we have made any necessary changes to documentation. - [ ] I/we have added tests that cover new code. - [x] I/we have run tests and they pass locally with the changes. (I ran `go test ./...` from the main dir, they passed with one exception related to thumbnail file size, most likely caused by testing on macOS) - [x] I/we have run `go fmt ./...` and `golangci-lint run`. Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4465 Co-authored-by: Zoë Bijl <code@moiety.me> Co-committed-by: Zoë Bijl <code@moiety.me>
2025-09-25[chore] update dependencies (#4458)Libravatar kim8
- codeberg.org/gruf/go-ffmpreg: v0.6.11 -> v0.6.12 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4458 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>