1
0
Fork 0

Check for M_USER_IN_USE in seed.js

This commit is contained in:
Cadence Ember 2023-11-30 17:10:41 +13:00
parent 2df7c665cb
commit 4dcdd0287e

View file

@ -71,7 +71,7 @@ async function uploadAutoEmoji(guild, name, filename) {
try {
await api.register(reg.sender_localpart)
} catch (e) {
if (e.data?.error !== "Internal server error") throw e // "Internal server error" is the only OK error because Synapse says this if you try to register the same username twice.
if (e.errcode === "M_USER_IN_USE" || e.data?.error !== "Internal server error") throw e // "Internal server error" is the only OK error because Synapse says this if you try to register the same username twice.
}
// upload initial images...