Skip to content

Commit

Permalink
fix: nickname可能为null
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Jan 20, 2025
1 parent afd6d45 commit 4592bf7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/types/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface BuddyCategoryType {
export interface CoreInfo {
uid: string;
uin: string;
nick: string;
nick?: string;
remark: string;
}

Expand Down
2 changes: 1 addition & 1 deletion src/onebot/helper/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export class OB11Construct {
...rawFriend.baseInfo,
...rawFriend.coreInfo,
user_id: parseInt(rawFriend.coreInfo.uin),
nickname: rawFriend.coreInfo.nick,
nickname: rawFriend.coreInfo.nick ?? "",
remark: rawFriend.coreInfo.remark ?? rawFriend.coreInfo.nick,
sex: this.sex(rawFriend.baseInfo.sex),
level: 0,
Expand Down

0 comments on commit 4592bf7

Please sign in to comment.