diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 18:27:47 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-17 18:27:47 +0100 |
commit | 4571cf7baadf360e27e05a73142571da9f165d47 (patch) | |
tree | ed5850f285a35df2353b3562ed4bca1fd34d5324 /synapse/api | |
parent | Remark on remaining storage modules that still need unit tests (diff) | |
parent | WEB-35: joins/parts should trigger desktop notifications (diff) | |
download | synapse-4571cf7baadf360e27e05a73142571da9f165d47.tar.xz |
Merge branch 'develop' into test-sqlite-memory
Diffstat (limited to 'synapse/api')
-rw-r--r-- | synapse/api/constants.py | 9 | ||||
-rw-r--r-- | synapse/api/events/__init__.py | 6 |
2 files changed, 11 insertions, 4 deletions
diff --git a/synapse/api/constants.py b/synapse/api/constants.py index fcef062fc9..618d3d7577 100644 --- a/synapse/api/constants.py +++ b/synapse/api/constants.py @@ -50,3 +50,12 @@ class JoinRules(object): KNOCK = u"knock" INVITE = u"invite" PRIVATE = u"private" + + +class LoginType(object): + PASSWORD = u"m.login.password" + OAUTH = u"m.login.oauth2" + EMAIL_CODE = u"m.login.email.code" + EMAIL_URL = u"m.login.email.url" + EMAIL_IDENTITY = u"m.login.email.identity" + RECAPTCHA = u"m.login.recaptcha" \ No newline at end of file diff --git a/synapse/api/events/__init__.py b/synapse/api/events/__init__.py index 4fe0608016..0cee196851 100644 --- a/synapse/api/events/__init__.py +++ b/synapse/api/events/__init__.py @@ -25,6 +25,7 @@ def serialize_event(hs, e): d = e.get_dict() if "age_ts" in d: d["age"] = int(hs.get_clock().time_msec()) - d["age_ts"] + del d["age_ts"] return d @@ -56,6 +57,7 @@ class SynapseEvent(JsonEncodedObject): "state_key", "required_power_level", "age_ts", + "prev_content", ] internal_keys = [ @@ -172,10 +174,6 @@ class SynapseEvent(JsonEncodedObject): class SynapseStateEvent(SynapseEvent): - valid_keys = SynapseEvent.valid_keys + [ - "prev_content", - ] - def __init__(self, **kwargs): if "state_key" not in kwargs: kwargs["state_key"] = "" |