fix: not checking for renotes during packing of note
Closes transfem-org/Sharkey#108
This commit is contained in:
parent
d49099baeb
commit
6d290225ef
|
@ -110,16 +110,29 @@ 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 {
|
} else {
|
||||||
// フォロワーかどうか
|
if (packedNote.renote) {
|
||||||
const isFollowing = await this.followingsRepository.exist({
|
const isFollowing = await this.followingsRepository.exist({
|
||||||
where: {
|
where: {
|
||||||
followeeId: packedNote.userId,
|
followeeId: packedNote.renote.userId,
|
||||||
followerId: meId,
|
followerId: meId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
hide = !isFollowing;
|
hide = !isFollowing;
|
||||||
|
} else {
|
||||||
|
// フォロワーかどうか
|
||||||
|
const isFollowing = await this.followingsRepository.exist({
|
||||||
|
where: {
|
||||||
|
followeeId: packedNote.userId,
|
||||||
|
followerId: meId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
hide = !isFollowing;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue