emoji reacts fix
This commit is contained in:
parent
08b06e7c01
commit
8ca71beef0
3 changed files with 14 additions and 6 deletions
|
|
@ -191,14 +191,22 @@ export const useStatusesStore = defineStore('statuses', {
|
|||
id,
|
||||
credentials: useOAuthStore().token,
|
||||
}).then(({ data, timestamp }) => {
|
||||
data.forEach((reaction) => {
|
||||
const reactions = data.map((reaction) => {
|
||||
const users = useUsersStore().addNewUsers({
|
||||
timestamp,
|
||||
data: reaction.accounts,
|
||||
})
|
||||
reaction.accounts = users
|
||||
|
||||
// Backend inconsistency - status data only has ids (account_ids)
|
||||
// but reactions data has full info (accounts)
|
||||
return {
|
||||
...reaction,
|
||||
accounts: users,
|
||||
account_ids: users.map(({ id }) => id),
|
||||
}
|
||||
})
|
||||
this.addEmojiReactionsBy(id, data)
|
||||
|
||||
this.addEmojiReactionsBy(id, reactions)
|
||||
})
|
||||
},
|
||||
fetchFavs(id) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue