Skip to content
Snippets Groups Projects
Unverified Commit 83460279 authored by piuvas's avatar piuvas
Browse files

populate myreaction on replies for streams.

parent 5eca807e
No related branches found
No related tags found
2 merge requests!9272025.2.2,!839fix: populate myreaction on replies for streams.
......@@ -72,6 +72,13 @@ class BubbleTimelineChannel extends Channel {
}
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction;
}
}
this.connection.cacheNote(note);
this.send('note', note);
......
......@@ -67,6 +67,13 @@ class GlobalTimelineChannel extends Channel {
}
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction;
}
}
this.connection.cacheNote(note);
this.send('note', note);
......
......@@ -88,6 +88,13 @@ class HomeTimelineChannel extends Channel {
}
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction;
}
}
this.connection.cacheNote(note);
this.send('note', note);
......
......@@ -106,6 +106,13 @@ class HybridTimelineChannel extends Channel {
}
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction;
}
}
this.connection.cacheNote(note);
this.send('note', note);
......
......@@ -77,6 +77,13 @@ class LocalTimelineChannel extends Channel {
}
}
if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction;
}
}
this.connection.cacheNote(note);
this.send('note', note);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment