650 Commits
Author SHA1 Message Date
osmarks 05e095c630 merge upstream 2026-07-08 12:56:04 +01:00
osmarks d2b1221d64 fix robots exclusions 2026-07-08 12:50:51 +01:00
tobiandtobi 4bb89d213f [bugfix] Add support for public:remote stream type (#4899)
Adds support for the `public:remote` stream type, ie., the federated timeline with *only* remote posts in it (as used by masto-fe in the "live feeds -> other servers" tab).

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4899
2026-06-23 15:05:02 +02:00
nicole mikołajczykandtobi 0b9a273c00 [docs] fix default param value definition (#4886)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have not used so-called 'AI' to create the proposed changes.
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [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`.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4886
2026-06-20 09:24:09 +02:00
tobiandtobi d40aefec8a [bugfix] fix erroneus use of RelayConnectionCreateRequest when updating a relay push (#4884)
Whoops! Fixes `Code 400: Bad Request: Key: 'RelayConnectionCreateRequest.RelayActorURI' Error:Field validation for 'RelayActorURI' failed on the 'required' tag` when updating a relay push.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4884
2026-06-19 11:41:18 +02:00
tobiandtobi b201dbeda5 [bugfix] Remove admin check on user-level relay push matchers (#4870)
🤦

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4870
2026-06-17 11:46:24 +02:00
tobiandtobi 1a58374aa7 [bugfix] Fix account domain being used incorrectly in api instance responses (#4863)
Fixes a cheeky little bug I wrote 😎

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4863
2026-06-16 10:42:22 +02:00
tobiandtobi 8bc9103f01 [chore] Return 202 when we're *forwarded* an activity originating from a domain we block (#4844)
# 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.

Solves an annoying issue where we returning 403 to inbox posts when the caller wasn't actually blocked, but was forwarding us an activity originating from a domain that is blocked. Instead we now just return 202 and drop the activity.

Also removes a bit of cruft with a custom error type and uses gtserror.NotRelevant instead.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [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/4844
2026-06-04 15:18:41 +02:00
tobiandtobi 3fe273cbd9 [feature] Show explanation when user shows no posts on the web (#4846)
# 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 updates some of our templating to add a little explainer at the bottom of the page when a profile doesn't show posts on the web view, and also renders such a profile in a wide view as there's no need for a double-column thingy if there's no posts.

![image](/attachments/4ce20e13-3cfa-405d-bb7b-450a33e2620e)

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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/4846
2026-06-02 16:01:38 +02:00
tobiandtobi a77b44caec [feature] better error pages + handling for hidden or gone statuses (#4840)
# 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.

Update some of our templating and error handling so that deleted local statuses return 410 Gone with a page explaining what's up, and statuses not visible in the web view return a 401 Unauthorized page with a link to copy the status and paste it into a client.

![Screenshot from 2026-05-27 14-33-29](/attachments/f41bd8ea-34c4-4862-ac5e-39c3c0efe6c5)

![Screenshot from 2026-05-27 14-33-11](/attachments/238a1678-adc0-4540-b279-cc39adf98c15)

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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/4840
2026-06-02 11:37:21 +02:00
tobiandkim cc3af19e78 [feature] Allow sorting access tokens by last_used, allow setting name per access token (#4833)
This pull request adds database + frontend functionality to sort the token view by last used time (most recent to oldest), and allows users to set a name per token, as a reminder of why the token was created / what device is using it, etc.

Also updates the token "last_used" updater to allow per-minute granularity instead of per-hour, since sorting by last_used is very confusing when you've just used a token but it's not shown up at the top of the list yet because you used it some time within the last hour.

Closes: https://codeberg.org/superseriousbusiness/gotosocial/issues/4689
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4833
2026-05-26 15:00:51 +02:00
bae8f079f0 [feature] add statuses multi GET endpoint (#4814)
this follows on from the work of @cdn0x12 in https://codeberg.org/superseriousbusiness/gotosocial/pulls/4795 but modifies the implementation to better make use of our multi lookup database and cache calls.

in addition to the above, this moves much of the surfacing (timelining and notifying) logic to derefencer hooks that are now setup to be called on dereference of accounts, statuses, media and emojis. though only statuses and media are hooked up for now.

Co-authored-by: cdn0x12 <git@cdn0x12.dev>
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4814
2026-05-21 11:18:35 +02:00
tobiandtobi 7161b5c7db [chore] Add more bullshit crawlers to robots.txt 🖕 (#4829)
Beep boop.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4829
2026-05-19 15:30:18 +02:00
tobiandtobi 8198126b3e [bugfix/frontend] Validate domain name for new domain perms earlier to avoid confusing err messages (#4826)
Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4733 by doing domain validation a bit earlier, and doing better domain validation on the "new domain perm" form thingy.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4826
2026-05-19 12:47:45 +02:00
kimandkim a2266f2818 [feature] add cleanup of old remote status threads (#4808)
- adds a new cleaner package task to cleanup old remote status threads, i.e. those older than a given date that have zero local replies, zero local favourites and no boosts of any of the constituents.
- moves a bunch of status deletion logic of related models to the database
- improves status related model deletion performance by adding multi delete queries
- improves some query performance by removing step of converting ID string slices to accountIDValue slices by using some "unsafe" memory casting (with appropriate compile-time checks in place)
- adds support for deprecating + renaming configuration fields
- adds new "longer" duration and cron expression types for our job scheduling configuration (+ deprecates the configuration fields where replacing)

in a later PR i'll add support for calling it from the frontend as an admin panel action type dealio

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4808
2026-05-15 14:52:28 +02:00
tobiandtobi 603c849740 [feature] Add button to clear instance delivery errors (#4818)
# 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 be useful: if you've defederated from an instance cuz it's not online anymore, you don't need those delivery errors hanging around forever.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [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/4818
2026-05-11 17:48:06 +02:00
tobiandtobi 39ad509968 [feature] Add db functions, api endpoints, and settings panel sections for relay subscriptions + pushes (#4796)
# 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 database functionality + tables for three new models: RelayPush, RelaySubscription, and RelayMatcher.
- adds api endpoints `/api/v1/admin/relay_subscriptions` etc, and `/api/v1/relay_pushes` etc, to allow admins to manage relay subscriptions, and users to manage relay push connections.
- adds settings panel sections for admins to manage relay subscriptions and relay subscription matchers, and for users to manage relay push connections and relay push matchers
- adds documentation for all of the above

The goal is, unlike other ActivityPub server softwares, to make a split between relay subscriptions (accepting delivery of posts from a relay), and relay push connections (pushing posts to a relay). Relay subscriptions are an admin-level thing, as they can cause ballooning storage size and we don't necessarily want users to be able to do that. On the other hand, relay pushes are a user level thing, as users should be able to configure on a granular level which posts of theirs are sent to which relays.

Using relay flags and relay matchers (see documentation), admins and users can configure exactly which posts are pulled and pushed via relays.

![admin-settings-relay-subscription](/attachments/6504419a-21ad-4782-ba33-3f3205d49c20)

Relates to https://codeberg.org/superseriousbusiness/gotosocial/issues/1123 but doesn't quite close it yet.

**THIS DOES NOT YET ADD BACKEND FUNCTIONALITY FOR ACTUALLY PUSHING POSTS + ACCEPTING POSTS** -- that will come in a separate PR.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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.
- [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/4796
2026-04-26 10:56:54 +02:00
osmarks 63ca147fc1 hacky patches 2026-04-25 14:03:24 +01:00
tobiandtobi 85050eec41 [feature] Serve instance actor AP representation without auth (#4798)
# 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.

Adapted from https://codeberg.org/superseriousbusiness/gotosocial/pulls/4235, all credit to @daenney, I just made this into a separate PR because it's easier than updating the 10-month old one.

Getting to this now because it'll be needed for the relay stuff (we use the instance actor for relay stuff, but not all relays do signed GETs).

Closes https://codeberg.org/superseriousbusiness/gotosocial/pulls/4235

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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/4798
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-04-21 15:56:52 +02:00
nicole mikołajczykandtobi f20588d778 [bugfix]: make GET /api/v1/admin/reports match Mastodon admin API (#4778)
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>

# Description

This pull request fixes the mismatch between GoToSocial implementation of the admin API and Mastodon *reference* implementation. I introduced the new `unresolved` parameter which I also suggested in a PR to Mastodon. ~~Will unmark as WIP when at home where I have a working GTS dev/testenv set up, I'm in a train rn.~~

closes #4378

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [ ] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [ ] 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.
- [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/4778
Co-authored-by: nicole mikołajczyk <git@mkljczk.pl>
Co-committed-by: nicole mikołajczyk <git@mkljczk.pl>
2026-04-01 12:38:20 +02:00
tobiandkim cc1316b498 [feature] Store delivery errors, add remote instances overview to view stored errors (#4741)
- reworks the `instances` table significantly, to remove a lot of stuff we weren't using, and add fields for storing delivery errors
- adds an `instance_settings` table that just stores local instance settings like title, description, etc, and uses this table for building responses to `/api/v1/instance` and and `/api/v2/instance`, instance metadata, etc
- passes a database connection to delivery workers so that they can store delivery errors or clear delivery errors on successful delivery
- adds admin instance endpoints `/api/v1/admin/instances` and `/api/v1/admin/instances/{instance}` for fetching admin view of instances
- adds setting panel stuff for viewing instances and whatnot

Relates to https://codeberg.org/superseriousbusiness/gotosocial/issues/2493
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4741
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-03-20 16:28:06 +01:00
kimandtobi 0415d71afc [feature] implement status deletion via stubbing (#4752)
# Description

- replaces status deletion in most cases with "stubbing" (similar to our account deletion)
- deleted status stubs are now cleaned up by a background cleanup routine (in the future this will be configurable and accessible via CLI and web)
- also adds a TODO.md to the repository root to track maintainer todos and the like!
- in a later PR i'll optimize both this and the last database migration to not drop + recreate so many indices for release users. (it's only useful having them separate like this for snapshot users)

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have not used so-called 'AI' to create the proposed changes.
- [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 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/4752
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2026-03-13 10:23:15 +01:00
kimandtobi 7362d55a35 [feature] add deleted flag to the statuses table to track tombstones (#4716)
# Description

- replaces a bunch of boolean (and like) columns with a single "statuses.flags" column
- adds a potential deleted value for the new "statuses.flags" column
- replaces useless migration.Down functions with empty txs with empty functions

In a future PR this will update our status deletion logic to instead stub-out a particular status row instead of deleting it, where necessary, to maintain status threads. In the process of replacing a bunch of columns with a single bit field this should also free up some storage space on the statuses table! It also replaces a bunch of indices with partials which again should further reduce space! ~~This is yet to be tested, so we shall see :p~~

Just finished testing this on my own instance...
- previous database size: 24827580416
- after database size: 21751169024

So 3GB of savings from a 24GB database, that's pretty damn impressive!

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have not used so-called 'AI' to create the proposed changes.
- [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 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/4716
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2026-03-10 10:15:19 +01:00
tobiandkim ec69200777 [feature] Add instance directory page for accounts that opt-in to discoverability (#4707)
This pull request adds the `/api/v1/directory` endpoint, and an instance directory page at `/directory` that shows a list of all accounts on the instance (local only) that have opted in to being discoverable in the account settings panel.

Also adds two new config variables: `instance-directory-mode`, and `instance-robots-allow-indexing`, which provide instance admins with granular controls over whether to expose the instance directory at all, and whether to allow search engine crawlers access to the directory.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4707
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-24 21:00:23 +01:00
tobiandtobi 1be91f98ac [bugfix] Fix suspend account reason not stored for manual admin actions (#4702)
# 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.

Due to a frontend issue the reason for suspension of an account by an admin wasn't being stored when an admin did a manual suspend account action. This fixes that!

closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4678

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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.
- [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/4702
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-16 18:47:21 +01:00
tobiandtobi 7fa9ed12ce [bugfix] Check boosted statuses for media when doing web media_only statuses queries (#4685)
# 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.

Now that we have an option to include reblogs, we needed to rejig the web "gram-style view" db queries to also look for media on reblogged / boosted statuses and include those too.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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.
- [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/4685
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-11 13:21:19 +01:00
kimandkim b0863b60e1 [feature] add a status visibility debug endpoint (#4682)
- adds a debug endpoint for debugging why a status may or may not be visible to you, with relevant swagger docs
- updates apiutil.NegotiateAccept() to return an errWithCode to reduce a tonne of repeated code

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4682
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2026-02-10 14:36:03 +01:00
tobiandkim 9696ef4fbe [feature] Opt-in to show boosts on web view of profile (respecting visibility settings) (#4680)
This pull request adds a new setting to allow GtS users to opt in to showing boosts on the web view of their profile. The default is "no", preserving existing behavior.

If an account allows showing boosts, web visitors can still toggle between including / excluding boosts on the web view, with a new link next to the "recent posts" header.

Privacy settings are respected for boosted posts, including hides_cc_public_from_unauthed_web and hides_to_public_from_unauthed_web.

To make this work, the web view index was recreated, and a new index was added for including boosts.

closes https://codeberg.org/superseriousbusiness/gotosocial/issues/926
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4680
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-10 11:42:21 +01:00
tobiandkim 8ac11f58db [feature] Add language dropdown to sign-in form, fall back to first instance language if not provided (#4679)
This pull request makes the `locale` parameter on account sign up optional, adds a language selector dropdown thingy to the sign up form, and uses that as an account's default posting language if provided. If not, falls back to the instance's first language (if configured). Otherwise, falls back to "en" (default behavior before this change).

Relates to https://codeberg.org/superseriousbusiness/gotosocial/issues/2061

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4679
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-09 14:23:38 +01:00
kimandkim 0efa81bb9a [chore] some twiddling (#4674)
Just looking back over the changes from when I was ill, I noticed in particular one place where logging could be a lot better if we included the object as a key-value field instead of in the quoted message string, (also should use less allocations). As part of doing this it adds a useful `gtserror.WithField()` function that allows attaching logging fields to an error that later get pulled out, for example, in the logging middleware.

Then also undoes a use of `slices.Contains()` that wasn't actually checking if the slice contained anything as it's syntactically confusing 😅

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4674
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2026-02-05 16:28:59 +01:00
tobiandtobi c5d255fb33 [bugfix] Use ipv6 cidr for trusted proxies req when clientIP is ipv6; check for empty clientIP before parsing (#4666)
# 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/4636
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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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/4666
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-02-02 14:31:38 +01:00
tobiandtobi 696fc66619 [feature] Preserve whitespace in opengraph meta description elements (#4658)
# 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.

More dicking about with opengraph meta stuff. This one preserves whitespace and newlines and indentation and stuff inside of ogmeta description tags. Should make multi-line posts look a LOT better when linked in discord etc.

![image](/attachments/8c8721c9-af00-4b4b-afd4-ad8044e6af7a)

Also closes https://codeberg.org/superseriousbusiness/gotosocial/issues/2452 for all intents + purposes, since text inside description tags is now converted to text, and go templating escapes them instead of them being escaped and *then* truncated.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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.
- [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/4658
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-01-29 11:43:44 +01:00
tobiandtobi 53ad3d6b8e [chore] Dick about with ogmeta tags a bit more (#4656)
Dicks about with opengraph a bit to try to make it a bit more coherent.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4656
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-01-26 16:21:57 +01:00
Jordan Roseandtobi 513a4e5507 [chore/frontend] Opengraph: for statuses with media, omit account and instance avatars (#4638)
# Description

This produces a better experience for consumers that can handle multiple OpenGraph attachments, like Discord (see #4631 for an example).

_This is among the first Go code I've written, so please tell me what I've done wrong! The testing is also a bit light, but the existing testing was light as well._

closes #4631

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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. _(none)_
- [x] I/we have added tests that cover new code.
- [x] I/we have run tests and they pass locally with the changes.\* _Some bundb tests timed out on my machine, but they shouldn't be affected._
- [x] I/we have run `go fmt ./...` and `golangci-lint run`.\* _There are some existing lint failures but they may be because I didn't install the exact same version of Go._

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4638
Co-authored-by: Jordan Rose <jrose@belkadan.com>
Co-committed-by: Jordan Rose <jrose@belkadan.com>
2026-01-26 13:08:58 +01:00
tobiandtobi d4521f9184 [feature] Send out and serve polite LikeRequest, ReplyRequest, and AnnounceRequest objects (#4642)
# 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 updates a bunch of our logic to send out polite LikeRequests, ReplyRequests, and AnnounceRequests where appropriate, instead of sending out "impolite" Likes, Create.Notes, and Announces.

GtS v0.20.0 and above should be compatible with these changes, but it will break compatibility for versions of GtS below that version, which do not understand LikeRequest, ReplyRequest, and AnnounceRequest (unfortunately!). Not much to be done about that, unfortunately!

This is part of the process of bringing GtS's way of doing interactions in line with the stuff Mastodon introduced in their QuoteRequest stuff, and paves the way to us also doing QuoteRequests at some point.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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. <-- going to do this in a separate PR
- [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/4642
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-01-22 11:26:33 +01:00
tobiandtobi af53aa0e2b [chore] Remove deprecated always and with_approval properties in favor of automatic_approval and manual_approval (#4643)
# 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.

Does as it says! We do still check for `always` and `manualApproval` when deserializing federated interaction policies though, but this will be removed in v0.22.0.

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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/4643
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2026-01-21 15:42:16 +01:00
kimandkim 42a231a98b [chore] store basic error details when failing to process remote media (#4625)
- drops `cached` columns from both media and emoji tables, instead relying on empty path
- drops `processed` column from media table, as it was totally unused
- adds `error` uint32 column to both media and emoji tables, and tracks basic error details encountered when trying to process remote media / emoji
- updates our media / emoji processor getter functions to attempt retries only if error situation is expected to be non-permanent
- adds a new `error` field to api attachment models to include error details string if failed to download
- updates media placeholder text generation to include error details string

Todos:
- ~~update cleaner to handle the new manner of `cached` flag (i.e. paths being set)~~
- ~~update tests~~

Nice-to-haves in later PRs:
- add 'force' flag for admins on media / emoji getter endpoints to allow forcing retry regardless of error type

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4625
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2026-01-15 17:26:54 +01:00
tobiandtobi b619f902eb [chore] Update robots.txt md5 hashes for etags (#4623)
Forgot to update these in https://codeberg.org/superseriousbusiness/gotosocial/pulls/4622

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4623
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-16 11:38:20 +01:00
tobiandtobi cbaf513375 [chore] Update robots.txt with latest list of "ai" bullshit user-agents (#4622)
Love this timeline.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4622
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-15 18:02:50 +01:00
tobiandkim e8e27f4412 [feature] Prepend domain limit content warning to posts as appropriate (#4618)
Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/9
Related #2676, #4554

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4618
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-10 16:30:30 +01:00
tobiandkim b1ffb66ba3 [feature] add /api/v1/admin/media_purge endpoint (#4613)
This pull request implements a media purge endpoint that allows admins to stub all media (attachments, avatars, headers, emojis) from a given domain. This will cause media to be removed from storage. Metadata like image description, remote URL, and blurhashes will be kept. This is useful in combination with domain limits, when an admin wants to immediately purge a domain's media after creating a limit.

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4613
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-10 16:19:20 +01:00
tobiandkim 74718a6cec [feature] Add domain limit media Reject and MarkSensitive side effects (#4611)
This pull request implements the side effects of domain limit media policy values `Reject` and `MarkSensitive`.

- In typeutils, `sensitive` is forced to `true` if necessary.
- In the dereferencer, limits are checked and the `RejectMedia` flag is passed through on media and emoji info.
- In the media manager, if `RejectMedia` is set to true, then `stubOnly` will be set on processing media and emojis, and the data function will not be called. Instead, any cached media will be uncached instead.

Important note about this: uncaching will be done *lazily*, ie., media won't be all deleted immediately as soon as the domain limit is put in place. It will take a while. ~~I'm thinking about adding some kind of purge media API endpoint...~~ - https://codeberg.org/superseriousbusiness/gotosocial/pulls/4613

Related: https://codeberg.org/superseriousbusiness/gotosocial/issues/2676, https://codeberg.org/superseriousbusiness/gotosocial/pulls/4554

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4611
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-09 16:03:29 +01:00
kimandtobi 1309d1e998 [chore] move packages to external repo (#4610)
# Description

This moves our `internal/{log/util/xslices}` packages out of the gotosocial repo and internal our external `code.superseriousbusiness.org/gopkg` repo. But it maintains an `internal/gtslog` subpkg for initialization of our logging configuration and syslog specifics (which aren't included in the external repo).

## Checklist

- [x] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have not used so-called 'AI' to create the proposed changes.
- [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 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/4610
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-12-08 10:59:43 +01:00
tobiandtobi a54a30b4d5 [bugfix] Preserve significant whitespace for new local plain posts + incoming remote posts (#4599)
# 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 updates normalization of incoming remote statuses to preserve whitespace -- which may be significant -- and updates our own parser to replace significant whitespace in new plaintext posts with non-breaking space characters.

Parsing of new local markdown posts is not affected, since using ` ` to represent significant whitespace is not part of the markdown spec afaik.

Closes https://codeberg.org/superseriousbusiness/gotosocial/issues/4533

## 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 two checkboxes 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 not used so-called 'AI' to create the proposed changes.
- [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 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.
- [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/4599
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-12-03 14:04:07 +01:00
kimandtobi 8cb4a5d652 [performance] add local, public and tag timeline caches (#4582)
# Description

Does as it says on the tin! Adds caching for local, public and tag timelines. The public and local timelines are instance-level, i.e. they are not keyed by account. And the tag timeline cache introduces intelligent unloading of timelines after a certain amount of time since some 'last use'.

This also removes the caching of "prepared" API models from timeline caches. It turns out I forgot to recache prepared models each time they were prepared, so the (good) performance we were getting was already only relying on the initial model supplied on individual insert, which in most cases will likely have been unprepared anyway. Removing the caching of prepared models also gains us the performance improvement that we can *massively* reduce the number of invalidate calls we were making to timeline caches, which removes a boatload of mutex locking and hashmap lookups. And it makes it incredibly simple to have instance-wide caches for timelines, that later get filtered post-caching-stage depending on the account viewing it!

~~Depends: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4569~~

## 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/4582
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-11-29 12:06:15 +01:00
kimandkim 91af264286 [chore] add nooidc build tag to support building without OIDC support (#4586)
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4586
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-11-28 00:42:45 +01:00
kimandkim 7e9dfb09cb [chore] don't add disabled http handlers (#4572)
- moves our timeout handler to gin middleware
- wraps gin routergroup to filter out any nil handlers we pass in

Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4572
Co-authored-by: kim <grufwub@gmail.com>
Co-committed-by: kim <grufwub@gmail.com>
2025-11-21 23:55:44 +01:00
d489dcb171 [feature] support for toot:indexable (#4538)
Adds account DB column, to/from AP and API formats, checkbox in settings UI. Doesn't change our own search behavior.

- Fixes #3062

## Remaining work

- [x] Add `noindex` to account serialization for client API for back compat
- [x] ~~Update templates to use `indexable` instead of `discoverable` to control `noindex` meta tags~~
- [x] Given that our profile public web page page also serves posts, I've opted to require both `indexable` and `discoverable` be true to remove `noindex` tags
- [x] Update docs to reflect that change
- [x] DB migration should duplicate `discoverable` to `indexable` rather than defaulting to `false`
- [x] Look at addressing #3064 by having a thread's collective `indexable` control the `noindex` meta tag for `thread.tmpl`

Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4538
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-14 12:43:30 +01:00
tobiandtobi fd2f293a9e [feature] Add domain limit DB model and API endpoints (#4554)
# 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 database models, (support) functions, migration, and API models + endpoints for upcoming domain limit functionality.

Part of https://codeberg.org/superseriousbusiness/gotosocial/issues/2676, https://codeberg.org/superseriousbusiness/gotosocial/issues/9, and https://codeberg.org/superseriousbusiness/gotosocial/issues/1730

## 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.
- [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/4554
Co-authored-by: tobi <tobi.smethurst@protonmail.com>
Co-committed-by: tobi <tobi.smethurst@protonmail.com>
2025-11-13 15:28:56 +01:00
Vyr Cossontandtobi 70edae8252 [bugfix] Add Swagger docs for the user:notification stream (#4555)
# 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-13 14:16:43 +01:00