core: auto-join system domain

This commit is contained in:
undefined committed 2025-03-20 17:55:10 +00:00
1 parent e15a310351
commit b9dbdc39ca
3 files changed
+20 -2

No files matched your search

+6
View File
@@ -336,6 +336,12 @@ class UserModel {
priv,
avatar: `gravatar:${mail}`,
});
// eslint-disable-next-line no-await-in-loop
await domain.collUser.updateOne(
{ uid, domainId: 'system' },
{ $set: { join: true } },
{ upsert: true },
);
return uid;
} catch (e) {
if (e?.code === 11000) {