mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 12:46:01 -04:00
Split out sending the room alias events from creating the alias so that we can do them in the right point when creating a room
This commit is contained in:
parent
c571dd4f0e
commit
a5b88c489e
4 changed files with 31 additions and 27 deletions
|
@ -75,13 +75,18 @@ class DirectoryStore(SQLBaseStore):
|
|||
Returns:
|
||||
Deferred
|
||||
"""
|
||||
yield self._simple_insert(
|
||||
"room_aliases",
|
||||
{
|
||||
"room_alias": room_alias.to_string(),
|
||||
"room_id": room_id,
|
||||
},
|
||||
)
|
||||
try:
|
||||
yield self._simple_insert(
|
||||
"room_aliases",
|
||||
{
|
||||
"room_alias": room_alias.to_string(),
|
||||
"room_id": room_id,
|
||||
},
|
||||
)
|
||||
except sqlite3.IntegrityError:
|
||||
raise SynapseError(
|
||||
409, "Room alias %s already exists" % room_alias.to_string()
|
||||
)
|
||||
|
||||
for server in servers:
|
||||
# TODO(erikj): Fix this to bulk insert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue