mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 18:04:49 -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
|
@ -28,7 +28,7 @@ from synapse.handlers import Handlers
|
|||
from synapse.rest import RestServletFactory
|
||||
from synapse.state import StateHandler
|
||||
from synapse.storage import DataStore
|
||||
from synapse.types import UserID, RoomAlias, RoomID
|
||||
from synapse.types import UserID, RoomAlias, RoomID, EventID
|
||||
from synapse.util import Clock
|
||||
from synapse.util.distributor import Distributor
|
||||
from synapse.util.lockutils import LockManager
|
||||
|
@ -143,6 +143,11 @@ class BaseHomeServer(object):
|
|||
object."""
|
||||
return RoomID.from_string(s, hs=self)
|
||||
|
||||
def parse_eventid(self, s):
|
||||
"""Parse the string given by 's' as a Event ID and return a EventID
|
||||
object."""
|
||||
return EventID.from_string(s, hs=self)
|
||||
|
||||
def serialize_event(self, e):
|
||||
return serialize_event(self, e)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue