Fix public_portals setting not being respected on portal creation

This commit is contained in:
Tulir Asokan
2021-08-17 00:17:21 +03:00
parent 13cac8db9a
commit 5d9cc490d7
+3 -2
View File
@@ -337,12 +337,13 @@ class PortalMetadata(BasePortal, ABC):
if self.peer_type == "channel":
self.megagroup = entity.megagroup
preset = RoomCreatePreset.PRIVATE
if self.peer_type == "channel" and entity.username:
preset = RoomCreatePreset.PUBLIC
if self.public_portals:
preset = RoomCreatePreset.PUBLIC
self.username = entity.username
alias = self.alias_localpart
else:
preset = RoomCreatePreset.PRIVATE
# TODO invite link alias?
alias = None