improvements.

This commit is contained in:
piuvas 2024-12-23 20:42:21 -03:00 committed by kakkokari-gtyih
parent 63829047e6
commit badb5de8c7
4 changed files with 32 additions and 8 deletions

View File

@ -60,12 +60,18 @@ class GlobalTimelineChannel extends Channel {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id); const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction; note.renote.myReaction = myRenoteReaction;
} }
if (note.renote && note.renote.reply) {
if (Object.keys(note.renote.reply.reactions).length > 0) {
const myReplyReaction = await this.noteEntityService.populateMyReaction(note.renote.reply, this.user.id);
note.renote.reply.myReaction = myReplyReaction;
}
}
} }
if (this.user && note.reply) { if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) { if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); const myReplyReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction; note.reply.myReaction = myReplyReaction;
} }
} }

View File

@ -84,12 +84,18 @@ class HomeTimelineChannel extends Channel {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id); const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction; note.renote.myReaction = myRenoteReaction;
} }
if (note.renote && note.renote.reply) {
if (Object.keys(note.renote.reply.reactions).length > 0) {
const myReplyReaction = await this.noteEntityService.populateMyReaction(note.renote.reply, this.user.id);
note.renote.reply.myReaction = myReplyReaction;
}
}
} }
if (this.user && note.reply) { if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) { if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); const myReplyReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction; note.reply.myReaction = myReplyReaction;
} }
} }

View File

@ -99,12 +99,18 @@ class HybridTimelineChannel extends Channel {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id); const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction; note.renote.myReaction = myRenoteReaction;
} }
if (note.renote && note.renote.reply) {
if (Object.keys(note.renote.reply.reactions).length > 0) {
const myReplyReaction = await this.noteEntityService.populateMyReaction(note.renote.reply, this.user.id);
note.renote.reply.myReaction = myReplyReaction;
}
}
} }
if (this.user && note.reply) { if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) { if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); const myReplyReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction; note.reply.myReaction = myReplyReaction;
} }
} }

View File

@ -70,12 +70,18 @@ class LocalTimelineChannel extends Channel {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id); const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction; note.renote.myReaction = myRenoteReaction;
} }
if (note.renote && note.renote.reply) {
if (Object.keys(note.renote.reply.reactions).length > 0) {
const myReplyReaction = await this.noteEntityService.populateMyReaction(note.renote.reply, this.user.id);
note.renote.reply.myReaction = myReplyReaction;
}
}
} }
if (this.user && note.reply) { if (this.user && note.reply) {
if (Object.keys(note.reply.reactions).length > 0) { if (Object.keys(note.reply.reactions).length > 0) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id); const myReplyReaction = await this.noteEntityService.populateMyReaction(note.reply, this.user.id);
note.reply.myReaction = myRenoteReaction; note.reply.myReaction = myReplyReaction;
} }
} }