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:
Daniel Wagner-Hall 2016-02-15 15:39:16 +00:00
parent dbeed36dec
commit e71095801f
5 changed files with 72 additions and 71 deletions

View file

@ -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