Implement rooms V3 through V9
This commit is contained in:
@@ -10,7 +10,7 @@ import httpx
|
||||
import json
|
||||
import re
|
||||
|
||||
version = "1.4.4"
|
||||
version = "1.5.0"
|
||||
|
||||
|
||||
def canonical_json(value):
|
||||
@@ -261,10 +261,14 @@ def make_ref_hash(
|
||||
|
||||
|
||||
def room_version_from_id(room):
|
||||
room_id_no_sigil = room.replace("!", "")
|
||||
room_id_no_sigil = (
|
||||
room
|
||||
.replace("!", "")
|
||||
.replace(f":{config.server_name}", "")
|
||||
)
|
||||
hexadecimal_room_id = bytes(room_id_no_sigil, "utf-8").hex()
|
||||
|
||||
versions = [str(i) for i in range(1, 3)]
|
||||
versions = [str(i) for i in range(1, 10)]
|
||||
|
||||
if not any(ver in hexadecimal_room_id for ver in versions):
|
||||
hexadecimal_room_id = "2" + hexadecimal_room_id[1:]
|
||||
|
||||
Reference in New Issue
Block a user