aboutsummaryrefslogtreecommitdiff
path: root/src/components/emoji_reactions/emoji_reactions.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/emoji_reactions/emoji_reactions.js')
-rw-r--r--src/components/emoji_reactions/emoji_reactions.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/components/emoji_reactions/emoji_reactions.js b/src/components/emoji_reactions/emoji_reactions.js
index e81e6e25..b37cce3d 100644
--- a/src/components/emoji_reactions/emoji_reactions.js
+++ b/src/components/emoji_reactions/emoji_reactions.js
@@ -4,12 +4,17 @@ const EmojiReactions = {
props: ['status'],
computed: {
emojiReactions () {
- return this.status.emojiReactions
+ console.log(this.status.emoji_reactions)
+ return this.status.emoji_reactions
}
},
methods: {
reactedWith (emoji) {
- return this.status.reactedWithEmoji.includes(emoji)
+ // return []
+ const user = this.$store.state.users.currentUser
+ const reaction = this.status.emoji_reactions.find(r => r.emoji === emoji)
+ console.log(reaction)
+ return reaction.accounts && reaction.accounts.find(u => u.id === user.id)
},
reactWith (emoji) {
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })