Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

last_active_ago is updated on sync when it shouldn't be #12424

Open
dbkr opened this issue Apr 8, 2022 · 0 comments
Open

last_active_ago is updated on sync when it shouldn't be #12424

dbkr opened this issue Apr 8, 2022 · 0 comments
Labels
A-Presence A-Sync defects related to /sync S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.

Comments

@dbkr
Copy link
Member

dbkr commented Apr 8, 2022

Description

The last_active_ts is updated for a user when they perform a regular sync request where their previous presence is 'online'. It looks like synapse intends to only update this when a sync is performed with set_presence = online and the previous presence state is online, and the spec says it should only be updated on a proactive event from the user.

This is because set_state is called in order to set the new presence state and this method always updated last_active_ago.

Found while working on #12213 but I think this will need another inter-process API added to fix.

Steps to reproduce

  • Have two users, leave one syncing.
  • On the other user, perform a sync request
  • Notice on the first sync stream that the last_active_ago value for the other user reflects the the sync you just did.

Version information

  • Homeserver:

If not matrix.org:

  • Version:

  • Install method:

  • Platform:
@squahtx squahtx added T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues. S-Tolerable Minor significance, cosmetic issues, low or no impact to users. labels Apr 8, 2022
@MadLittleMods MadLittleMods changed the title last_active_ago is updated on sync when it shouldn't be last_active_ago is updated on sync when it shouldn't be Apr 25, 2023
@MadLittleMods MadLittleMods added A-Presence A-Sync defects related to /sync labels Apr 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Presence A-Sync defects related to /sync S-Tolerable Minor significance, cosmetic issues, low or no impact to users. T-Defect Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Projects
None yet
3 participants