diff options
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: |