From 7e90ec8c14111c24e8da93e0c2ae5f876fbfd9bf Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Sun, 9 Jul 2023 14:57:54 +0300 Subject: [PATCH] Fix setting DM room name at creation --- portal.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/portal.go b/portal.go index 57921bf..78aa44f 100644 --- a/portal.go +++ b/portal.go @@ -597,7 +597,8 @@ func (portal *Portal) UpdateBridgeInfo() { func (portal *Portal) shouldSetDMRoomMetadata() bool { return !portal.IsPrivateChat() || portal.bridge.Config.Bridge.PrivateChatPortalMeta == "always" || - (portal.IsEncrypted() && portal.bridge.Config.Bridge.PrivateChatPortalMeta != "never") + ((portal.IsEncrypted() || (portal.MXID == "" && portal.bridge.Config.Bridge.Encryption.Default)) && + portal.bridge.Config.Bridge.PrivateChatPortalMeta != "never") } func (portal *Portal) GetEncryptionEventContent() (evt *event.EncryptionEventContent) {