fix: uid->uin 临时修复方案

uid uin转换需要优化
This commit is contained in:
手瓜一十雪 2024-06-28 13:11:06 +08:00
parent bf10ce9f1e
commit 861f105bea

View File

@ -460,11 +460,13 @@ export class NapCatOnebot11 {
groupRequestEvent.group_id = parseInt(notify.group.groupCode); groupRequestEvent.group_id = parseInt(notify.group.groupCode);
let requestQQ = ''; let requestQQ = '';
try { try {
// requestQQ = (await NTQQUserApi.getUserDetailInfo(notify.user1.uid)).uin;
// uid-->uin // uid-->uin
requestQQ = (await NTQQUserApi.getUinByUid(notify.user1.uid))!; requestQQ = (await NTQQUserApi.getUinByUid(notify.user1.uid))!;
if (isNaN(parseInt(requestQQ))) {
requestQQ = (await NTQQUserApi.getUserDetailInfo(notify.user1.uid)).uin;
}
} catch (e) { } catch (e) {
logError('获取加群人QQ号失败', e); logError('获取加群人QQ号失败 Uid:', notify.user1.uid, e);
} }
groupRequestEvent.user_id = parseInt(requestQQ) || 0; groupRequestEvent.user_id = parseInt(requestQQ) || 0;
groupRequestEvent.sub_type = 'add'; groupRequestEvent.sub_type = 'add';