mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 20:32:50 +02:00
Do cache space members in member_cache
This commit is contained in:
parent
f42eb6495f
commit
5b06d5984a
9 changed files with 40 additions and 52 deletions
|
@ -33,7 +33,7 @@ async function createSim(pkMessage) {
|
|||
const mxid = `@${localpart}:${reg.ooye.server_name}`
|
||||
|
||||
// Save chosen name in the database forever
|
||||
db.prepare("INSERT INTO sim (user_id, sim_name, localpart, mxid) VALUES (?, ?, ?, ?)").run(pkMessage.member.uuid, simName, localpart, mxid)
|
||||
db.prepare("INSERT INTO sim (user_id, username, sim_name, mxid) VALUES (?, ?, ?, ?)").run(pkMessage.member.uuid, simName, simName, mxid)
|
||||
|
||||
// Register matrix user with that name
|
||||
try {
|
||||
|
|
|
@ -33,7 +33,7 @@ async function createSim(user) {
|
|||
|
||||
// Save chosen name in the database forever
|
||||
// Making this database change right away so that in a concurrent registration, the 2nd registration will already have generated a different localpart because it can see this row when it generates
|
||||
db.prepare("INSERT INTO sim (user_id, sim_name, localpart, mxid) VALUES (?, ?, ?, ?)").run(user.id, simName, localpart, mxid)
|
||||
db.prepare("INSERT INTO sim (user_id, username, sim_name, mxid) VALUES (?, ?, ?, ?)").run(user.id, user.username, simName, mxid)
|
||||
|
||||
// Register matrix user with that name
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue