Skip to content

Commit

Permalink
Merge pull request #248 from cnxysoft/upmain
Browse files Browse the repository at this point in the history
fix: GetCookie容错
  • Loading branch information
MliKiowa authored Aug 13, 2024
2 parents 25253ad + f0306cd commit 51bbb48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/onebot/action/user/GetCookies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class GetCookies extends BaseAction<Payload, Response> {
const cookiesObject = await NTQQUserApi.getCookies(payload.domain);
//把获取到的cookiesObject转换成 k=v; 格式字符串拼接在一起
const cookies = Object.entries(cookiesObject).map(([key, value]) => `${key}=${value}`).join('; ');
const bkn = NTQQWebApi.getBknFromCookie(cookiesObject);
const bkn = cookiesObject?.skey ? NTQQWebApi.getBknFromCookie(cookiesObject) : '';
return { cookies, bkn };
}
}

0 comments on commit 51bbb48

Please sign in to comment.