mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-19 17:38:19 +08:00
core: feat: QQ ID autofill at registry (#1072)
This commit is contained in:
1 parent
0ae449515a
commit
cc413531f1
1 file changed
+4
-1
@@ -312,7 +312,10 @@ class UserRegisterWithCodeHandler extends Handler {
|
||||
await token.del(code, token.TYPE_REGISTRATION);
|
||||
const [id, mailDomain] = this.tdoc.mail.split('@');
|
||||
const $set: any = this.tdoc.set || {};
|
||||
if (mailDomain === 'qq.com' && !Number.isNaN(+id)) $set.avatar = `qq:${id}`;
|
||||
if (mailDomain === 'qq.com' && !Number.isNaN(+id)) {
|
||||
$set.avatar = `qq:${id}`;
|
||||
$set.qq = `${id}`;
|
||||
}
|
||||
if (this.session.viewLang) $set.viewLang = this.session.viewLang;
|
||||
if (Object.keys($set).length) await user.setById(uid, $set);
|
||||
if (Object.keys(this.tdoc.setInDomain || {}).length) await domain.setUserInDomain(domainId, uid, this.tdoc.setInDomain);
|
||||
|
||||
Reference in new issue
Block a user