mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 15:44:50 -04:00
Ratelimit cross-user key sharing requests. (#8957)
This commit is contained in:
parent
179c0953ff
commit
fc8b3d8809
9 changed files with 67 additions and 17 deletions
|
@ -18,7 +18,7 @@ from typing import TYPE_CHECKING, Optional, Tuple
|
|||
|
||||
from twisted.internet import defer
|
||||
|
||||
from synapse.api.constants import EventTypes, Membership
|
||||
from synapse.api.constants import EduTypes, EventTypes, Membership
|
||||
from synapse.api.errors import SynapseError
|
||||
from synapse.events.validator import EventValidator
|
||||
from synapse.handlers.presence import format_user_presence_state
|
||||
|
@ -412,7 +412,7 @@ class InitialSyncHandler(BaseHandler):
|
|||
|
||||
return [
|
||||
{
|
||||
"type": EventTypes.Presence,
|
||||
"type": EduTypes.Presence,
|
||||
"content": format_user_presence_state(s, time_now),
|
||||
}
|
||||
for s in states
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue