Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to disable presence tracking for offline devices. #18140

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

sklamt
Copy link

@sklamt sklamt commented Feb 6, 2025

This pull request adds the option offline_untracked to the presence.enabled configuration. This prevents synapse from updating the last_active_ts when receiving events from a client which is currently offline.

This would improve privacy by enabling users to decide whether they want their activity seen by other users with a shared room.

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)

@sklamt sklamt marked this pull request as ready for review February 6, 2025 15:55
@sklamt sklamt requested a review from a team as a code owner February 6, 2025 15:55
@anoadragon453
Copy link
Member

@sklamt I've approved CI to run. Note that someone doing so for you won't be necessary after one of your PRs are merged 🙂

The Matrix spec does not forbid this tweak, which is great. I think being able to disable informing other users about a user's activity while offline is a worthwhile feature. Doing so as an option is a good idea, unless it breaks previous assumptions.

@sklamt sklamt force-pushed the disable_offline_presence branch 2 times, most recently from bf16f24 to a283099 Compare February 10, 2025 16:28
@@ -0,0 +1 @@
Add option to disable presence tracking for offline devices.
Copy link
Contributor

Choose a reason for hiding this comment

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

Should it always do this? Is this a privacy leak? (Do we need an option?)

Copy link
Author

@sklamt sklamt Feb 17, 2025

Choose a reason for hiding this comment

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

I could also do this without an option. For us, changing the default behaviour would be fine.
The spec does not explicitly say anything about this, but I am not sure whether this may break some use cases.

@sklamt sklamt force-pushed the disable_offline_presence branch from a283099 to af11828 Compare February 19, 2025 12:15
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.

3 participants