fix: set_qq_profile 无法将性别设置为 0(未知) (#2065)

This commit is contained in:
Shxiao authored and GitHub committed 2026-09-23 16:52:24 +08:00
1 parent 46e505f4ba
commit 0b4cfe65ed
2 files changed
+67 -1

No files matched your search

@@ -26,7 +26,7 @@ export class SetQQProfile extends OneBotAction<SetQQProfilePayload, any> {
return await this.core.apis.UserApi.modifySelfProfile({
nick: payload.nickname,
longNick: (payload?.personal_note ?? OldProfile?.longNick) || '',
sex: parseInt(payload?.sex ? payload?.sex.toString() : OldProfile?.sex!.toString()),
sex: parseInt(payload.sex != null && payload.sex !== '' ? payload.sex.toString() : OldProfile?.sex!.toString()),
birthday: {
birthday_year: OldProfile?.birthday_year!.toString(),
birthday_month: OldProfile?.birthday_month!.toString(),