Skip to content

Conversation

turt2live
Copy link
Member

@turt2live turt2live commented Mar 13, 2025

This probably needs a config option or filter parameter or something, but for now the immediate need is to exclude admins from the soft fail hiding logic.

There is now a config flag - see included docs.

Pull Request Checklist

  • Pull request is based on the develop branch
  • Pull request includes a changelog file. The entry should:
    • Be a short description of your change which makes sense to users. "Fixed a bug that prevented receiving messages from other servers." instead of "Moved X method from EventStore to EventWorkerStore.".
    • Use markdown where necessary, mostly for code blocks.
    • End with either a period (.) or an exclamation mark (!).
    • Start with a capital letter.
    • Feel free to credit yourself, by adding a sentence "Contributed by @github_username." or "Contributed by [Your Name]." to the end of the entry.
  • Code style is correct
    (run the linters)

@turt2live turt2live requested a review from a team as a code owner March 13, 2025 21:04
turt2live and others added 4 commits March 13, 2025 15:05
@turt2live
Copy link
Member Author

Thanks for getting this deployed quickly. It's already proven extremely valuable in mitigating spam 💚

I'm not sure this PR is exactly in a great position to land as-is though. Many server operators are admins themselves, and would be disproportionately affected by receiving confusing events. Given the number of APIs which route through this function, it feels potentially useful to just define a list of admin user IDs in the config which can have this applied to them rather than a query string/filter parameter. Are there thoughts on the approach? Is a different solution preferred?

@TheArcaneBrony
Copy link

Clients being able to tell them appart over sync etc would be nice, as mentioned in my review thread.
Almost all users on ie. rory.gay are admins, bot or not (some exceptions being bots...).

@turt2live
Copy link
Member Author

that would be scope for a future PR or MSC.

@FSG-Cat
Copy link
Contributor

FSG-Cat commented Mar 23, 2025

As a homeserver admin i think that the option of defining who this applies to rather than all admins sounds great. The exact way to do that i wont comment on.

Copy link

@Gnuxie Gnuxie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't do this because downstream devs will not have time to evaluate the implications of suddenly receiving soft failed events.

Instead it would be nice to add a toggle somewhere. Like the rate limits API https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#override-ratelimiting-for-users. Ideally this would just be an option on /sync but if this is needed quickly then modelling after the rate limit override API would be a good compromise.

@turt2live
Copy link
Member Author

Please read #18238 (comment) - this PR is waiting for backend review.

@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 21:18 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 21:25 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 21:28 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 21:32 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 22:24 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 22:56 Active
@turt2live turt2live changed the title Allow admins to see soft failed events Allow admins to see soft failed events (if they want to) Jun 19, 2025
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 23:07 Active
@github-actions github-actions bot deployed to PR Documentation Preview June 19, 2025 23:38 Active
@turt2live turt2live requested review from a team and anoadragon453 June 19, 2025 23:57
@@ -0,0 +1,25 @@
# Client-Server API Extensions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in the #synapse-dev:matrix.org room

@MadLittleMods MadLittleMods requested a review from a team June 20, 2025 19:26
Copy link
Member

@anoadragon453 anoadragon453 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some small things, otherwise this LGTM! Thanks!

@github-actions github-actions bot deployed to PR Documentation Preview July 4, 2025 17:24 Active
@github-actions github-actions bot deployed to PR Documentation Preview July 4, 2025 17:27 Active
@anoadragon453 anoadragon453 merged commit 5129668 into develop Jul 14, 2025
45 checks passed
@anoadragon453 anoadragon453 deleted the travis/admin-soft-fail branch July 14, 2025 15:55
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Aug 7, 2025
Tested on NetBSD 9 amd64 (federation, multiple clients)

# Synapse 1.135.0 (2025-08-01)

## Features

- Add `recaptcha_private_key_path` and `recaptcha_public_key_path` config option. ([\#17984](element-hq/synapse#17984), [\#18684](element-hq/synapse#18684))
- Add plain-text handling for rich-text topics as per [MSC3765](matrix-org/matrix-spec-proposals#3765). ([\#18195](element-hq/synapse#18195))
- If enabled by the user, server admins will see [soft failed](https://spec.matrix.org/v1.13/server-server-api/#soft-failure) events over the Client-Server API. ([\#18238](element-hq/synapse#18238))
- Add experimental support for [MSC4277: Harmonizing the reporting endpoints](matrix-org/matrix-spec-proposals#4277). ([\#18263](element-hq/synapse#18263))
- Add ability to limit amount of media uploaded by a user in a given time period. ([\#18527](element-hq/synapse#18527))
- Enable workers to write directly to the device lists stream and handle device list updates, reducing load on the main process. ([\#18581](element-hq/synapse#18581))
- Support arbitrary profile fields. Contributed by @clokep. ([\#18635](element-hq/synapse#18635))
- Advertise support for Matrix v1.12. ([\#18647](element-hq/synapse#18647))
- Add an option to issue redactions as an admin user via the [admin redaction endpoint](https://element-hq.github.io/synapse/latest/admin_api/user_admin_api.html#redact-all-the-events-of-a-user). ([\#18671](element-hq/synapse#18671))
- Add experimental and incomplete support for [MSC4306: Thread Subscriptions](https://github.com/matrix-org/matrix-spec-proposals/blob/rei/msc_thread_subscriptions/proposals/4306-thread-subscriptions.md). ([\#18674](element-hq/synapse#18674))
- Include `event_id` when getting state with `?format=event`. Contributed by @tulir @ Beeper. ([\#18675](element-hq/synapse#18675))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants