summary refs log tree commit diff
path: root/synapse/types.py
diff options
context:
space:
mode:
authorDaniel Wagner-Hall <dawagner@gmail.com>2016-02-18 11:48:28 +0000
committerDaniel Wagner-Hall <dawagner@gmail.com>2016-02-18 11:48:28 +0000
commit35cda2e6927dabb0d9782c3181d1dbbea231c9e5 (patch)
treefee32bfdc6f723fd465c20e4842a19bdaca6e0af /synapse/types.py
parentMerge pull request #580 from Rugvip/develop (diff)
parentReview comments (diff)
downloadsynapse-35cda2e6927dabb0d9782c3181d1dbbea231c9e5.tar.xz
Merge pull request #583 from matrix-org/daniel/roomcleanupincremental
Merge all of the room membership codepaths into one
Diffstat (limited to 'synapse/types.py')
-rw-r--r--synapse/types.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/types.py b/synapse/types.py

index 2095837ba6..d5bd95cbd3 100644 --- a/synapse/types.py +++ b/synapse/types.py
@@ -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