We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b54af0 commit 4b235deCopy full SHA for 4b235de
mautrix_telegram/portal_util/message_convert.py
@@ -237,10 +237,10 @@ def _caption_to_message(converted: ConvertedMessage) -> None:
237
content["format"] = Format.HTML.value
238
239
def _get_external_url(self, evt: Message) -> str | None:
240
- if self.portal.peer_type == "channel" and self.portal.username is not None:
241
- return f"https://t.me/{self.portal.username}/{evt.id}"
242
- elif self.portal.peer_type != "user":
+ if self.portal.peer_type == "chat":
243
return f"https://t.me/c/{self.portal.tgid}/{evt.id}"
+ if self.portal.username is not None:
+ return f"https://t.me/{self.portal.username}/{evt.id}"
244
return None
245
246
@staticmethod
0 commit comments