mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-08 04:51:58 +00:00
Don't ratelimit room create events
This commit is contained in:
parent
45a6869cb4
commit
a999f0dec3
@ -155,4 +155,4 @@ class DirectoryHandler(BaseHandler):
|
|||||||
"room_id": room_id,
|
"room_id": room_id,
|
||||||
"sender": user_id,
|
"sender": user_id,
|
||||||
"content": {"aliases": aliases},
|
"content": {"aliases": aliases},
|
||||||
})
|
}, ratelimit=False)
|
||||||
|
@ -106,7 +106,7 @@ class MessageHandler(BaseHandler):
|
|||||||
defer.returnValue(chunk)
|
defer.returnValue(chunk)
|
||||||
|
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def create_and_send_event(self, event_dict):
|
def create_and_send_event(self, event_dict, ratelimit=True):
|
||||||
""" Given a dict from a client, create and handle a new event.
|
""" Given a dict from a client, create and handle a new event.
|
||||||
|
|
||||||
Creates an FrozenEvent object, filling out auth_events, prev_events,
|
Creates an FrozenEvent object, filling out auth_events, prev_events,
|
||||||
@ -123,7 +123,8 @@ class MessageHandler(BaseHandler):
|
|||||||
|
|
||||||
self.validator.validate_new(builder)
|
self.validator.validate_new(builder)
|
||||||
|
|
||||||
self.ratelimit(builder.user_id)
|
if ratelimit:
|
||||||
|
self.ratelimit(builder.user_id)
|
||||||
# TODO(paul): Why does 'event' not have a 'user' object?
|
# TODO(paul): Why does 'event' not have a 'user' object?
|
||||||
user = self.hs.parse_userid(builder.user_id)
|
user = self.hs.parse_userid(builder.user_id)
|
||||||
assert self.hs.is_mine(user), "User must be our own: %s" % (user,)
|
assert self.hs.is_mine(user), "User must be our own: %s" % (user,)
|
||||||
|
Loading…
Reference in New Issue
Block a user