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

fix: Update special chats icons even if they are blocked (#5509) #5540

Merged
merged 2 commits into from May 11, 2024

Conversation

iequidoo
Copy link
Collaborator

@iequidoo iequidoo commented May 7, 2024

E.g. the multi-device synchronisation creates the "Saved Messages" chat as blocked, in this case the chat icon wasn't updated before and the user avatar was displayed instead.

Fix #5509

EDIT: In the most other places ChatIdBlocked's method must be used as well, fixed them too.

E.g. the multi-device synchronisation creates the "Saved Messages" chat as blocked, in this case the
chat icon wasn't updated before and the user avatar was displayed instead.
@iequidoo iequidoo force-pushed the iequidoo/update_saved_messages_icon branch from 96bee0c to e410119 Compare May 7, 2024 07:03
@iequidoo iequidoo marked this pull request as ready for review May 7, 2024 07:03
@iequidoo iequidoo requested review from r10s and adbenitez May 7, 2024 07:03
@r10s
Copy link
Member

r10s commented May 7, 2024

thanks a lot for diving into this issue, @iequidoo!

E.g. the multi-device synchronisation creates the "Saved Messages" chat as blocked

was that a bug then? creating saved messages as "Blocked" or as "Contact Request" seems wrong - but i do not see in the code how that is fixed now - imu, the changes to ChatIdBlocked::lookup_by_contact() only make sure to get the ChatId even if blocked.

but i am also sure not to have the full picture :)

@iequidoo
Copy link
Collaborator Author

iequidoo commented May 7, 2024

was that a bug then? creating saved messages as "Blocked" or as "Contact Request" seems wrong - but i do not see in the code how that is fixed now - imu, the changes to ChatIdBlocked::lookup_by_contact() only make sure to get the ChatId even if blocked.

I think creating the self-chat as blocked isn't a bug, it's for making the chat hidden in the chatlist (if it hasn't yet existed or was deleted) -- see your initial commit 65f09c2. So, you're the author :) Anyway the self-chat gets unblocked when the user tries to look it up the first time. But if you e.g. try to forward some message, you wouldn't see the self-chat if you didn't use it before, not sure if this is on purpose.

@r10s
Copy link
Member

r10s commented May 7, 2024

thanks for the detailed explanations - and yeah, i forgot that the saved-messages chat needs to be created hidden for $reasons :) and that it was even me :)

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

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

lgtm, i think, we do a round of testing anyways, so it is good to get that in soon

…d when applicable

`ChatId::lookup_by_contact()` returns `None` for blocked chats, so it should be only used if we need
to filter out blocked chats, e.g. when building a chatlist.
@iequidoo iequidoo force-pushed the iequidoo/update_saved_messages_icon branch from e410119 to 17e3694 Compare May 8, 2024 00:16
@iequidoo iequidoo merged commit ab1583e into main May 11, 2024
37 of 38 checks passed
@iequidoo iequidoo deleted the iequidoo/update_saved_messages_icon branch May 11, 2024 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Setting selfavatar before configure changes the "Saved Messages" chat icon to avatar image
3 participants