mirror of
https://github.com/element-hq/synapse
synced 2024-09-15 15:35:12 +00:00
Intern host strings
This commit is contained in:
parent
07a07588a0
commit
537dbadea0
1 changed files with 2 additions and 1 deletions
|
@ -18,6 +18,7 @@ from twisted.internet import defer
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from ._base import SQLBaseStore
|
from ._base import SQLBaseStore
|
||||||
|
from synapse.util.caches import intern_string
|
||||||
from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
|
from synapse.util.caches.descriptors import cached, cachedInlineCallbacks
|
||||||
from synapse.util.stringutils import to_ascii
|
from synapse.util.stringutils import to_ascii
|
||||||
|
|
||||||
|
@ -516,7 +517,7 @@ class RoomMemberStore(SQLBaseStore):
|
||||||
|
|
||||||
event = yield self.get_event(event_id, allow_none=True)
|
event = yield self.get_event(event_id, allow_none=True)
|
||||||
if event and event.content["membership"] == Membership.JOIN:
|
if event and event.content["membership"] == Membership.JOIN:
|
||||||
joined_hosts.add(host)
|
joined_hosts.add(intern_string(host))
|
||||||
|
|
||||||
defer.returnValue(joined_hosts)
|
defer.returnValue(joined_hosts)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue