mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 20:34:14 -04:00
Add StreamKeyType
class and replace string literals with constants (#12567)
This commit is contained in:
parent
3ce15cc7be
commit
83be72d76c
19 changed files with 125 additions and 80 deletions
|
@ -16,7 +16,7 @@ from typing import TYPE_CHECKING, Optional
|
|||
|
||||
from synapse.api.constants import EventTypes, Membership, RoomCreationPreset
|
||||
from synapse.events import EventBase
|
||||
from synapse.types import Requester, UserID, create_requester
|
||||
from synapse.types import Requester, StreamKeyType, UserID, create_requester
|
||||
from synapse.util.caches.descriptors import cached
|
||||
|
||||
if TYPE_CHECKING:
|
||||
|
@ -189,7 +189,7 @@ class ServerNoticesManager:
|
|||
max_id = await self._account_data_handler.add_tag_to_room(
|
||||
user_id, room_id, SERVER_NOTICE_ROOM_TAG, {}
|
||||
)
|
||||
self._notifier.on_new_event("account_data_key", max_id, users=[user_id])
|
||||
self._notifier.on_new_event(StreamKeyType.ACCOUNT_DATA, max_id, users=[user_id])
|
||||
|
||||
logger.info("Created server notices room %s for %s", room_id, user_id)
|
||||
return room_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue