Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Merge pull request #2982 from matrix-org/erikj/fix_extra_users
Browse files Browse the repository at this point in the history
extra_users is actually a list of UserIDs
  • Loading branch information
erikjohnston authored Mar 13, 2018
2 parents da87791 + d0fcc48 commit c82111a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion synapse/handlers/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def handle_new_client_event(
event (FrozenEvent)
context (EventContext)
ratelimit (bool)
extra_users (list(str)): Any extra users to notify about event
extra_users (list(UserID)): Any extra users to notify about event
"""

try:
Expand Down
8 changes: 4 additions & 4 deletions synapse/replication/http/send_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from synapse.util.caches.response_cache import ResponseCache
from synapse.util.logcontext import make_deferred_yieldable, preserve_fn
from synapse.util.metrics import Measure
from synapse.types import Requester
from synapse.types import Requester, UserID

import logging
import re
Expand All @@ -46,7 +46,7 @@ def send_event_to_master(client, host, port, requester, event, context,
event (FrozenEvent)
context (EventContext)
ratelimit (bool)
extra_users (list(str)): Any extra users to notify about event
extra_users (list(UserID)): Any extra users to notify about event
"""
uri = "http://%s:%s/_synapse/replication/send_event/%s" % (
host, port, event.event_id,
Expand All @@ -59,7 +59,7 @@ def send_event_to_master(client, host, port, requester, event, context,
"context": context.serialize(event),
"requester": requester.serialize(),
"ratelimit": ratelimit,
"extra_users": extra_users,
"extra_users": [u.to_string() for u in extra_users],
}

try:
Expand Down Expand Up @@ -143,7 +143,7 @@ def _handle_request(self, request):
context = yield EventContext.deserialize(self.store, content["context"])

ratelimit = content["ratelimit"]
extra_users = content["extra_users"]
extra_users = [UserID.from_string(u) for u in content["extra_users"]]

if requester.user:
request.authenticated_entity = requester.user.to_string()
Expand Down

0 comments on commit c82111a

Please sign in to comment.