mirror of
https://github.com/element-hq/synapse
synced 2024-09-04 03:10:07 +00:00
Rate limit display names and avatar urls per request rather than per event.
This commit is contained in:
parent
efd27ff01b
commit
67a406a754
1 changed files with 4 additions and 2 deletions
|
@ -194,6 +194,8 @@ class ProfileHandler(BaseHandler):
|
||||||
if not self.hs.is_mine(user):
|
if not self.hs.is_mine(user):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
self.ratelimit(user.to_string())
|
||||||
|
|
||||||
joins = yield self.store.get_rooms_for_user_where_membership_is(
|
joins = yield self.store.get_rooms_for_user_where_membership_is(
|
||||||
user.to_string(),
|
user.to_string(),
|
||||||
[Membership.JOIN],
|
[Membership.JOIN],
|
||||||
|
@ -214,5 +216,5 @@ class ProfileHandler(BaseHandler):
|
||||||
"room_id": j.room_id,
|
"room_id": j.room_id,
|
||||||
"state_key": j.state_key,
|
"state_key": j.state_key,
|
||||||
"content": content,
|
"content": content,
|
||||||
"sender": j.state_key,
|
"sender": j.state_key
|
||||||
})
|
}, ratelimit=False)
|
||||||
|
|
Loading…
Reference in a new issue