mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 22:14:55 -04:00
Merge implementation of /join by alias or ID
This code is kind of rough (passing the remote servers down a long chain), but is a step towards improvement.
This commit is contained in:
parent
dbeed36dec
commit
e71095801f
5 changed files with 72 additions and 71 deletions
|
@ -73,6 +73,14 @@ class DomainSpecificString(
|
|||
"""Return a string encoding the fields of the structure object."""
|
||||
return "%s%s:%s" % (self.SIGIL, self.localpart, self.domain)
|
||||
|
||||
@classmethod
|
||||
def is_valid(cls, s):
|
||||
try:
|
||||
cls.from_string(s)
|
||||
return True
|
||||
except:
|
||||
return False
|
||||
|
||||
__str__ = to_string
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue