You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AIscript api returning fields with null that should be undefined #607
Specifically in plugin development, I noticed this in Plugin:register_note_post_interruptor where it passes in a note and directly returning this note object doesn't work since a lot of fields are null that should be undefined.
A temp fix that works for this at least for my case was
Plugin:register_note_post_interruptor(@(note) {
//My fix for misskeys broken AIscript
var newPost = {}
let keys = Obj:keys(note)
for let i, keys.len {
let key = keys[i]
if note[key] != null {
newPost[key] = note[key]
}
}
return newPost;
})
However, I think directly returning the note (While not doing anything) should work without error.
I think this could be an issue in other places too and it should be investigated.
Activity
salano-ym commentedon Mar 27, 2024
That's a bug in Misskey, not Aiscript
Plugin:is implementd in Misskeysee misskey-dev/misskey#9207