mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:26:09 -04:00
Add and use get_domian_from_id
This commit is contained in:
parent
96d9d5d388
commit
08dfa8eee2
6 changed files with 23 additions and 28 deletions
|
@ -33,7 +33,7 @@ from synapse.util.logcontext import preserve_fn
|
|||
from synapse.util.logutils import log_function
|
||||
from synapse.util.metrics import Measure
|
||||
from synapse.util.wheel_timer import WheelTimer
|
||||
from synapse.types import UserID
|
||||
from synapse.types import UserID, get_domian_from_id
|
||||
import synapse.metrics
|
||||
|
||||
from ._base import BaseHandler
|
||||
|
@ -440,7 +440,7 @@ class PresenceHandler(BaseHandler):
|
|||
if not local_states:
|
||||
continue
|
||||
|
||||
host = UserID.from_string(user_id).domain
|
||||
host = get_domian_from_id(user_id)
|
||||
hosts_to_states.setdefault(host, []).extend(local_states)
|
||||
|
||||
# TODO: de-dup hosts_to_states, as a single host might have multiple
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue