forked from cadence/out-of-your-element
Ensure the appservice bot user is registered
Synapse does it automatically, but Conduit requires this HTTP call.
This commit is contained in:
parent
a542bbdca7
commit
762e48230c
2 changed files with 13 additions and 6 deletions
|
@ -36,7 +36,7 @@ async function createSim(user) {
|
|||
await api.register(localpart)
|
||||
} catch (e) {
|
||||
// If user creation fails, manually undo the database change. Still isn't perfect, but should help.
|
||||
// (A transaction would be preferable, but I don't think it's safe to leave transaction open across event loop ticks.)
|
||||
// (I would prefer a transaction, but it's not safe to leave transactions open across event loop ticks.)
|
||||
db.prepare("DELETE FROM sim WHERE user_id = ?").run(user.id)
|
||||
throw e
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue