Skip to content

Commit 2c45d8d

Browse files
committed
Remove send_welcome_message override
1 parent fac337e commit 2c45d8d

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

mautrix_telegram/matrix.py

-17
Original file line numberDiff line numberDiff line change
@@ -115,23 +115,6 @@ async def handle_puppet_invite(self, room_id: RoomID, puppet: pu.Puppet, inviter
115115
await intent.send_notice(room_id, "This puppet will remain inactive until a "
116116
"Telegram chat is created for this room.")
117117

118-
async def send_welcome_message(self, room_id: RoomID, inviter: 'u.User') -> None:
119-
try:
120-
is_management = len(await self.az.intent.get_room_members(room_id)) == 2
121-
except MatrixError:
122-
# The AS bot is not in the room.
123-
return
124-
cmd_prefix = self.commands.command_prefix
125-
text = html = "Hello, I'm a Telegram bridge bot. "
126-
if is_management and inviter.puppet_whitelisted and not await inviter.is_logged_in():
127-
text += f"Use `{cmd_prefix} help` for help or `{cmd_prefix} login` to log in."
128-
html += (f"Use <code>{cmd_prefix} help</code> for help"
129-
f" or <code>{cmd_prefix} login</code> to log in.")
130-
else:
131-
text += f"Use `{cmd_prefix} help` for help."
132-
html += f"Use <code>{cmd_prefix} help</code> for help."
133-
await self.az.intent.send_notice(room_id, text=text, html=html)
134-
135118
async def handle_invite(self, room_id: RoomID, user_id: UserID, inviter: 'u.User',
136119
event_id: EventID) -> None:
137120
user = u.User.get_by_mxid(user_id, create=False)

0 commit comments

Comments
 (0)