0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-13 17:23:21 +01:00

Enable rate limiting for all events

This commit is contained in:
Erik Johnston 2014-12-16 16:10:17 +00:00
parent 23da4a4051
commit f06161a307

View file

@ -154,6 +154,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: