Compare commits

...

2 commits

Author SHA1 Message Date
f676cc1f19
fix: undefine unspecified parameters on profile updates 2023-12-27 18:59:21 +09:00
bdbe8a046b
fix (minor): merge mistake 2023-12-27 18:43:42 +09:00
3 changed files with 9 additions and 9 deletions

View file

@ -41,7 +41,7 @@
"prepublishOnly": "napi prepublish -t npm",
"universal": "napi universal",
"version": "napi version",
"format": "cargo fmt --all -- --check",
"lint": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt --all -- --check"
"format": "cargo fmt --all --",
"lint": "cargo clippy --fix --allow-dirty --allow-staged && cargo fmt --all --"
}
}

View file

@ -118,7 +118,7 @@ export const paramDef = {
preventAiLearning: { type: "boolean" },
isBot: { type: "boolean" },
isCat: { type: "boolean" },
speakAsCat: { type: "boolean" },
speakAsCat: { type: "boolean", nullable: true },
isIndexable: { type: "boolean" },
injectFeaturedNote: { type: "boolean" },
receiveAnnouncementEmail: { type: "boolean" },

View file

@ -231,14 +231,14 @@ function saveFields() {
function save() {
os.apiWithDialog("i/update", {
name: profile.name || null,
description: profile.description || null,
location: profile.location || null,
birthday: profile.birthday || null,
lang: profile.lang || null,
name: profile.name ?? undefined,
description: profile.description ?? undefined,
location: profile.location ?? undefined,
birthday: profile.birthday ?? undefined,
lang: profile.lang ?? undefined,
isBot: !!profile.isBot,
isCat: !!profile.isCat,
speakAsCat: !!profile.speakAsCat,
speakAsCat: profile.isCat ? !!profile.speakAsCat : undefined,
});
}