mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-18 09:39:13 -04:00
Convert event ids to be of the form :example.com
This commit is contained in:
parent
da511334d2
commit
12ce441e67
6 changed files with 54 additions and 28 deletions
|
@ -78,6 +78,11 @@ class DomainSpecificString(
|
|||
"""Create a structure on the local domain"""
|
||||
return cls(localpart=localpart, domain=hs.hostname, is_mine=True)
|
||||
|
||||
@classmethod
|
||||
def create(cls, localpart, domain, hs):
|
||||
is_mine = domain == hs.hostname
|
||||
return cls(localpart=localpart, domain=domain, is_mine=is_mine)
|
||||
|
||||
|
||||
class UserID(DomainSpecificString):
|
||||
"""Structure representing a user ID."""
|
||||
|
@ -94,6 +99,11 @@ class RoomID(DomainSpecificString):
|
|||
SIGIL = "!"
|
||||
|
||||
|
||||
class EventID(DomainSpecificString):
|
||||
"""Structure representing an event id. """
|
||||
SIGIL = "$"
|
||||
|
||||
|
||||
class StreamToken(
|
||||
namedtuple(
|
||||
"Token",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue