mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-26 23:03:09 +02:00
fix: not checking for renotes during packing of note
Closes transfem-org/Sharkey#108
This commit is contained in:
parent
d49099baeb
commit
6d290225ef
1 changed files with 21 additions and 8 deletions
|
@ -110,6 +110,18 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
} else if (packedNote.mentions && packedNote.mentions.some(id => meId === id)) {
|
} else if (packedNote.mentions && packedNote.mentions.some(id => meId === id)) {
|
||||||
// 自分へのメンション
|
// 自分へのメンション
|
||||||
hide = false;
|
hide = false;
|
||||||
|
} else if (packedNote.renote && (meId === packedNote.renote.userId)) {
|
||||||
|
hide = false;
|
||||||
|
} else {
|
||||||
|
if (packedNote.renote) {
|
||||||
|
const isFollowing = await this.followingsRepository.exist({
|
||||||
|
where: {
|
||||||
|
followeeId: packedNote.renote.userId,
|
||||||
|
followerId: meId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
hide = !isFollowing;
|
||||||
} else {
|
} else {
|
||||||
// フォロワーかどうか
|
// フォロワーかどうか
|
||||||
const isFollowing = await this.followingsRepository.exist({
|
const isFollowing = await this.followingsRepository.exist({
|
||||||
|
@ -122,6 +134,7 @@ export class NoteEntityService implements OnModuleInit {
|
||||||
hide = !isFollowing;
|
hide = !isFollowing;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (hide) {
|
if (hide) {
|
||||||
packedNote.visibleUserIds = undefined;
|
packedNote.visibleUserIds = undefined;
|
||||||
|
|
Loading…
Reference in a new issue