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

[Bug]: Blocked state not properly synchronized in contact details #1254

Open
tmolitor-stud-tu opened this issue Sep 29, 2024 · 0 comments
Open
Labels
🦸 Help wanted If you are motivated, this is a good start!

Comments

@tmolitor-stud-tu
Copy link
Member

tmolitor-stud-tu commented Sep 29, 2024

If you open Contact Details from a chat view, then block the contact, the button would change from Block Contact to Unblock Contact.
If you then go back to the contact's chat view, and reopen its contactDetails, the button will be reset to Block Contact
Note: there are no changes on the blocklist when that happens. Also, this problem doesn't happen if you access ContactDetails from the contactList, block contact, close it and open it again.

This bug seems to be related to the DataLayer method -(NSDictionary* _Nullable) contactDictionaryForUsername:(NSString*) username forAccount:(NSNumber*) accountID returning a blocked dictionary item that's not related to our blocklistCache database and that column should be removed from our buddylist table.
The method -(uint8_t) isBlockedContact:(MLContact*) contact should be the only source for the blocked state and is already used by MLContact method -(void) handleBlockListRefresh:(NSNotification*) notification.

@tmolitor-stud-tu tmolitor-stud-tu added the 🦸 Help wanted If you are motivated, this is a good start! label Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦸 Help wanted If you are motivated, this is a good start!
Projects
None yet
Development

No branches or pull requests

1 participant