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

Properly initialize a contact's blocked state #1255

Merged

Conversation

lissine0
Copy link
Member

Fixes #1254

The changes I force-pushed are not strictly necessary. But I think they make it clearer that we don't expect a @"blocked" key in the dictionary we get from DataLayer
This works because an uninitialized BOOL is set to false by default.

@lissine0 lissine0 force-pushed the blocked-contact-details branch 2 times, most recently from bf6dbe3 to fd39c9a Compare September 30, 2024 20:26
@tmolitor-stud-tu
Copy link
Member

This still has a bug: the dummy contact could still be blocked (whole domain or by bare jid), even if it is a dummy contact not being in our buddylist.

Your code does not handle that correctly.

Copy link
Member

@tmolitor-stud-tu tmolitor-stud-tu left a comment

Choose a reason for hiding this comment

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

Small changes required, other than that, this is now mergeable :)

@@ -233,7 +228,12 @@ +(MLContact*) createContactFromDatabaseWithJid:(NSString*) jid andAccountID:(NSN
}];
}
else
return [self contactFromDictionary:contactDict];
{
Copy link
Member

Choose a reason for hiding this comment

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

the curly braces are not needed here, because this is a single instruction.

@tmolitor-stud-tu tmolitor-stud-tu merged commit 4447eb1 into monal-im:develop Oct 9, 2024
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.

[Bug]: Blocked state not properly synchronized in contact details
2 participants