mirror of
https://github.com/chatmail/core.git
synced 2026-04-28 19:06:35 +03:00
fix permanently hiding of one-to-one chats after secure-join (#2791)
* test one-to-one chats on setup-contact/secure-join only one chat is created after scanning a QR code: - on setup-contact, one-to-ones are created on both sided - on secure-join, the joined group chat is created; one-to-ones are not created intitally, but should become visible on receiving messages * make sure, Alice creates the chat with Bob on setup-contact not totally sure if that change in #2508 was on-purpose, however, all yet released versions did create the one-to-one chat also on the Inviter's (Alice) side, so, let's stay with that, i do not see many reasons to change that. * unblock hidden (Blocked::Yes) one-to-one chats one-to-one chats may be hidden by secure-join, in case someone later writes a message to it (not unlikely), the chat needs to be shown. before, messages are just not shown, the corresponding chat did not appear. the 'Blocked' wording of a 'Chat' must not be mixed with the 'Blocking' of a contact. 'Chat-Blocking' is mostly a visibility thing, that may change as messages come in. this change should not affect _really_ blocked contacts - they are filtered out already before and their messages are usually not even downloaded. also, before allow_creation is checked, that may disallow chat creation for show_emails reasons. all in all, it just does the same as if the user has manualy deleted the chat before and it would be created. * simplify test
This commit is contained in:
@@ -266,7 +266,7 @@ impl ChatId {
|
||||
/// Updates chat blocked status.
|
||||
///
|
||||
/// Returns true if the value was modified.
|
||||
async fn set_blocked(self, context: &Context, new_blocked: Blocked) -> Result<bool> {
|
||||
pub(crate) async fn set_blocked(self, context: &Context, new_blocked: Blocked) -> Result<bool> {
|
||||
if self.is_special() {
|
||||
bail!("ignoring setting of Block-status for {}", self);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user