Skip to content

Conversation

@iequidoo
Copy link
Collaborator

The normal way of synchronizing self-avatar and -status nowadays is sync messages.
This is the second commit from #7123
Fixes (probably) #7002

The normal way of synchronizing self-avatar and -status nowadays is sync messages.
@iequidoo iequidoo requested a review from Hocuri November 26, 2025 00:05
Copy link
Collaborator

@link2xt link2xt left a comment

Choose a reason for hiding this comment

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

Good thing about synchronizing from non-sync message is that it works even if sync message is lost. With this change if sync message is lost, avatar and status is not synced anymore.

Overall I don't like the idea of changing something in this logic without reproducing the bug first, #7002 is closed as we cannot find a way to reproduce it.

/// Reactions do not contain the status,
/// but should not result in self-status being reset on other devices.
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_reaction_status_multidevice() -> Result<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why the test is removed, did it break?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It broke because it also tests that the self-status is synced from outgoing messages. Anyway, it's no longer relevant because with this PR there's nothing special to reactions anymore. The new behavior is now tested by contact_tests::test_synchronize_status

@iequidoo
Copy link
Collaborator Author

iequidoo commented Nov 27, 2025

Good thing about synchronizing from non-sync message is that it works even if sync message is lost. With this change if sync message is lost, avatar and status is not synced anymore.

OTOH the avatar and status can't be reverted to the old ones anymore, this looks more valuable to me. Otherwise we need to add some timestamp of the avatar/status change and do smth similar to we do in the group consistency algo.

Overall I don't like the idea of changing something in this logic without reproducing the bug first, #7002 is closed as we cannot find a way to reproduce it.

This isn't only to (maybe) fix #7002 , but also to simplify the code and make the self-avatar and -status sync logic the same as for other synced config keys.

Wrt #7002 , i'm able to reproduce it if i change the self-status, delete the sync message and send a message to "Saved Messages" from another device. This reverts the self-status change on the first device. Maybe it was not the case for that issue, but lost sync messages aren't smth that cannot happen, sometimes i experience lost messages in my Gmail profile.

@iequidoo iequidoo requested a review from link2xt November 27, 2025 22:09
@iequidoo iequidoo merged commit 2c00927 into main Nov 29, 2025
29 checks passed
@iequidoo iequidoo deleted the iequidoo/dont-update-self-avatar,status branch November 29, 2025 05:19
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