Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
fix: not checking for renotes during packing of note
Browse files Browse the repository at this point in the history
Closes #108
  • Loading branch information
Mar0xy committed Oct 22, 2023
1 parent d49099b commit 6d29022
Showing 1 changed file with 21 additions and 8 deletions.
29 changes: 21 additions & 8 deletions packages/backend/src/core/entities/NoteEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,29 @@ export class NoteEntityService implements OnModuleInit {
} else if (packedNote.mentions && packedNote.mentions.some(id => meId === id)) {
// 自分へのメンション
hide = false;
} else if (packedNote.renote && (meId === packedNote.renote.userId)) {
hide = false;
} else {
// フォロワーかどうか
const isFollowing = await this.followingsRepository.exist({
where: {
followeeId: packedNote.userId,
followerId: meId,
},
});
if (packedNote.renote) {
const isFollowing = await this.followingsRepository.exist({
where: {
followeeId: packedNote.renote.userId,
followerId: meId,
},
});

hide = !isFollowing;
} else {
// フォロワーかどうか
const isFollowing = await this.followingsRepository.exist({
where: {
followeeId: packedNote.userId,
followerId: meId,
},
});

hide = !isFollowing;
hide = !isFollowing;
}
}
}

Expand Down

0 comments on commit 6d29022

Please sign in to comment.