mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-26 09:10:11 +02:00
Serialize create
This commit is contained in:
parent
f948362a73
commit
33e9be387b
|
@ -202,6 +202,7 @@ class MessageStorage {
|
||||||
}
|
}
|
||||||
|
|
||||||
// This channel was not found, create it and "recursively" call getChannelId again
|
// This channel was not found, create it and "recursively" call getChannelId again
|
||||||
|
this.database.serialize(() =>
|
||||||
this.database.run(
|
this.database.run(
|
||||||
"INSERT INTO channels (network, channel) VALUES (?, ?)",
|
"INSERT INTO channels (network, channel) VALUES (?, ?)",
|
||||||
[network.uuid, channelName],
|
[network.uuid, channelName],
|
||||||
|
@ -212,6 +213,7 @@ class MessageStorage {
|
||||||
|
|
||||||
this.getChannelId(network, channel).then(resolve).catch(reject);
|
this.getChannelId(network, channel).then(resolve).catch(reject);
|
||||||
}
|
}
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue