Enable rate limiting for all events
This commit is contained in:
parent
23da4a4051
commit
f06161a307
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue