summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/app/common/scripts')
-rw-r--r--src/client/app/common/scripts/note-subscriber.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts
index c41897e70f..6c994aa9bc 100644
--- a/src/client/app/common/scripts/note-subscriber.ts
+++ b/src/client/app/common/scripts/note-subscriber.ts
@@ -86,8 +86,16 @@ export default prop => ({
switch (type) {
case 'reacted': {
const reaction = body.reaction;
- if (this.$_ns_target.reactionCounts == null) Vue.set(this.$_ns_target, 'reactionCounts', {});
+
+ if (this.$_ns_target.reactionCounts == null) {
+ Vue.set(this.$_ns_target, 'reactionCounts', {});
+ }
+
this.$_ns_target.reactionCounts[reaction] = (this.$_ns_target.reactionCounts[reaction] || 0) + 1;
+
+ if (body.userId == this.$store.state.i.id) {
+ Vue.set(this.$_ns_target, 'myReaction', reaction);
+ }
break;
}