Implement /portal/{mxid}/create

This commit is contained in:
Tulir Asokan
2018-07-14 23:14:04 +03:00
parent 34cc810d62
commit 4cef2be0db
6 changed files with 205 additions and 47 deletions
+3
View File
@@ -310,6 +310,9 @@ class User(AbstractUser):
@classmethod
def get_by_mxid(cls, mxid, create=True):
if not mxid:
raise ValueError("Matrix ID can't be empty")
try:
return cls.by_mxid[mxid]
except KeyError: