Fix get_tag_room_alias

Needs to include also the server name.
merge-requests/166/head
Jason Robinson 2021-05-08 23:13:49 +03:00
rodzic 5c79a5d1cb
commit dd102d4575
1 zmienionych plików z 2 dodań i 3 usunięć

Wyświetl plik

@ -181,10 +181,9 @@ class MatrixRoomMessage(Post, MatrixEntityMixin):
if payloads:
self._payloads.extend(payloads)
@staticmethod
def get_tag_room_alias(tag: str) -> str:
def get_tag_room_alias(self, tag: str) -> str:
config = get_matrix_configuration()
return f"#_{config['appservice']['shortcode']}_#{slugify(tag)}"
return f"#_{config['appservice']['shortcode']}_#{slugify(tag)}:{self.server_name}"
def get_tag_room_alias_url_safe(self, tag: str) -> str:
return f"{quote(self.get_tag_room_alias(tag))}"