mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
fix: do not create 1:1 chat on second device when scanning a QR code
This avoids creating 1:1 chat on a second device when joining a channel. Now when joining a channel there may be no 1:1 chat with the inviter when the channel is created. In this case we still create the channel as unblocked even if 1:1 chat would be a contact request because joining the channel is an explicit action and it is not possible to add someone who did not scan a QR to the channel manually.
This commit is contained in:
@@ -3562,7 +3562,14 @@ async fn create_or_lookup_mailinglist_or_broadcast(
|
||||
chattype,
|
||||
&listid,
|
||||
name,
|
||||
create_blocked,
|
||||
if chattype == Chattype::InBroadcast {
|
||||
// If we joined the broadcast, we have scanned a QR code.
|
||||
// Even if 1:1 chat does not exist or is in a contact request,
|
||||
// create the channel as unblocked.
|
||||
Blocked::Not
|
||||
} else {
|
||||
create_blocked
|
||||
},
|
||||
param,
|
||||
mime_parser.timestamp_sent,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user