fix: return empty emoji list for polls for masto app

This commit is contained in:
Mar0xy 2023-09-25 16:08:31 +02:00
parent dd72610daa
commit 607a3e7427
No known key found for this signature in database
GPG Key ID: 56569BBE47D2C828
2 changed files with 2 additions and 0 deletions

View File

@ -9,5 +9,6 @@ namespace Entity {
votes_count: number
options: Array<PollOption>
voted: boolean
emojis?: []
}
}

View File

@ -254,6 +254,7 @@ namespace MisskeyAPI {
votes_count: count,
options: Array.isArray(p.choices) ? p.choices.map(c => choice(c)) : [],
voted: Array.isArray(p.choices) ? p.choices.some(c => c.isVoted) : false,
emojis: [],
}
}