修正面板查询时在一些情况下的uid错误

This commit is contained in:
yoimiya-kokomi 2022-06-13 06:16:52 +08:00
parent dffeef4497
commit 5d0c88d3a3

View File

@ -696,7 +696,13 @@ async function getTargetUid(e) {
}
} catch (e) {
let qq = e.user_id;
uid = await redis.get(`genshin:id-uid:${qq}`) || await Cache.get(`genshin:uid:${qq}`);
if (NoteCookie && NoteCookie[qq]) {
let nc = NoteCookie[qq];
if (nc.uid && uidReg.test(nc.uid)) {
return nc.uid;
}
}
uid = await redis.get(`genshin:id-uid:${qq}`) || await redis.get(`genshin:uid:${qq}`);
if (uid && uidReg.test(uid)) {
return uid;
} else {
@ -704,7 +710,6 @@ async function getTargetUid(e) {
return false;
}
}
return uid;
}