This commit is contained in:
syuilo 2023-10-14 15:16:53 +09:00
parent e0618e9443
commit c1be538ccf
7 changed files with 21 additions and 14 deletions

View File

@ -45,8 +45,9 @@ class ChannelChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -71,8 +71,9 @@ class GlobalTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -50,8 +50,9 @@ class HashtagChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -73,8 +73,9 @@ class HomeTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -87,8 +87,9 @@ class HybridTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -70,8 +70,9 @@ class LocalTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);

View File

@ -102,8 +102,9 @@ class UserListChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
if (note.renote) {
// TODO: ZQT: populate my reaction
if (this.user && note.renote && !note.text) {
const myRenoteReaction = await this.noteEntityService.populateMyReaction(note.renote, this.user.id);
note.renote.myReaction = myRenoteReaction;
}
this.connection.cacheNote(note);