diff options
author | Mark Haines <mark.haines@matrix.org> | 2014-12-16 17:29:49 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2014-12-16 17:29:49 +0000 |
commit | 56db465047c2906a78eccdd63b2fa18d72903a66 (patch) | |
tree | bdd082c04fd0c02b4d732bf8ea6e4dd559d84b51 /synapse/handlers | |
parent | SYN-142: Use a default log file 'homeserver.log' so people get logging by def... (diff) | |
parent | Change upgrade script to not check hashes or signatures (diff) | |
download | synapse-56db465047c2906a78eccdd63b2fa18d72903a66.tar.xz |
Merge branch 'release-v0.6.0' into develop
Diffstat (limited to 'synapse/handlers')
-rw-r--r-- | synapse/handlers/message.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/handlers/message.py b/synapse/handlers/message.py index b529d890bb..49c0e98113 100644 --- a/synapse/handlers/message.py +++ b/synapse/handlers/message.py @@ -123,6 +123,11 @@ class MessageHandler(BaseHandler): self.validator.validate_new(builder) + self.ratelimit(builder.user_id) + # TODO(paul): Why does 'event' not have a 'user' object? + user = self.hs.parse_userid(builder.user_id) + assert self.hs.is_mine(user), "User must be our own: %s" % (user,) + if builder.type == EventTypes.Member: membership = builder.content.get("membership", None) if membership == Membership.JOIN: |