Fix: Mk:C:mfmonClickEvが正常に呼び出されない問題を修正 (#12831)

* fix clickable api

* Update CHANGELOG.md

* revert CHANGELOG.md

* Update CHANGELOG.md
This commit is contained in:
FineArchs 2024-01-07 13:29:17 +09:00 committed by GitHub
parent 00e195f50b
commit 622a09f8ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -218,7 +218,7 @@ function getTextOptions(def: values.Value | undefined): Omit<AsUiText, 'id' | 't
}; };
} }
function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'type'> { function getMfmOptions(def: values.Value | undefined, call: (fn: values.VFn, args: values.Value[]) => Promise<values.Value>): Omit<AsUiMfm, 'id' | 'type'> {
utils.assertObject(def); utils.assertObject(def);
const text = def.value.get('text'); const text = def.value.get('text');
@ -241,7 +241,7 @@ function getMfmOptions(def: values.Value | undefined): Omit<AsUiMfm, 'id' | 'typ
color: color?.value, color: color?.value,
font: font?.value, font: font?.value,
onClickEv: (evId: string) => { onClickEv: (evId: string) => {
if (onClickEv) call(onClickEv, values.STR(evId)); if (onClickEv) call(onClickEv, [values.STR(evId)]);
}, },
}; };
} }