Skip to content

Commit

Permalink
Create less rooms
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Dec 21, 2023
1 parent 37333a1 commit a73c875
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mautrix_telegram/bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ async def handle_command_portal(self, portal: po.Portal, reply: ReplyFunc) -> Me
if not portal.allow_bridging:
return await reply("This bridge doesn't allow bridging this chat.")

await portal.create_matrix_room(self)
# await portal.create_matrix_room(self)
if portal.mxid:
if portal.username:
return await reply(
Expand Down
6 changes: 3 additions & 3 deletions mautrix_telegram/portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3373,7 +3373,7 @@ async def _handle_telegram_message(
) -> None:
if not self.mxid:
self.log.debug("Got telegram message %d, but no room exists, creating...", evt.id)
await self.create_matrix_room(source, invites=[source.mxid], update_if_exists=False)
# await self.create_matrix_room(source, invites=[source.mxid], update_if_exists=False)
if not self.mxid:
self.log.warning("Room doesn't exist even after creating, dropping %d", evt.id)
return
Expand Down Expand Up @@ -3536,8 +3536,8 @@ async def _mark_disappearing(
async def _create_room_on_action(
self, source: au.AbstractUser, action: TypeMessageAction
) -> bool:
if source.is_relaybot and self.config["bridge.ignore_unbridged_group_chat"]:
return False
# if source.is_relaybot and self.config["bridge.ignore_unbridged_group_chat"]:
return False
create_and_exit = (MessageActionChatCreate, MessageActionChannelCreate)
create_and_continue = (
MessageActionChatAddUser,
Expand Down

0 comments on commit a73c875

Please sign in to comment.