upd: change the way quote gets handled
This commit is contained in:
parent
b2d367faed
commit
205881bfa9
2 changed files with 3 additions and 3 deletions
|
@ -38,7 +38,7 @@ namespace Entity {
|
||||||
language: string | null
|
language: string | null
|
||||||
pinned: boolean | null
|
pinned: boolean | null
|
||||||
emoji_reactions: Array<Reaction>
|
emoji_reactions: Array<Reaction>
|
||||||
quote: boolean
|
quote: Status | boolean | null
|
||||||
bookmarked: boolean
|
bookmarked: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ namespace MisskeyAPI {
|
||||||
multiple: p.multiple,
|
multiple: p.multiple,
|
||||||
votes_count: count,
|
votes_count: count,
|
||||||
options: Array.isArray(p.choices) ? p.choices.map(c => choice(c)) : [],
|
options: Array.isArray(p.choices) ? p.choices.map(c => choice(c)) : [],
|
||||||
voted: Array.isArray(p.choices) ? p.choices.some(c => c.isVoted) : false
|
voted: Array.isArray(p.choices) ? p.choices.some(c => c.isVoted) : false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ namespace MisskeyAPI {
|
||||||
pinned: null,
|
pinned: null,
|
||||||
emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [],
|
emoji_reactions: typeof n.reactions === 'object' ? mapReactions(n.reactions, n.myReaction) : [],
|
||||||
bookmarked: false,
|
bookmarked: false,
|
||||||
quote: n.renote !== undefined && n.text !== null
|
quote: n.renote && n.text ? note(n.renote, host) : null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue