don't leak boost / quote / reply contents when CW is in effect

This commit is contained in:
Hazel K 2024-10-02 00:54:35 -04:00
parent cb10fe91bb
commit c0583e5d5c
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
// 返信のとき // 返信のとき
if (note.replyId) { if (note.replyId) {
if (note.reply) { if (note.reply && !note.cw) {
summary += `\n\nRE: ${getNoteSummary(note.reply)}`; summary += `\n\nRE: ${getNoteSummary(note.reply)}`;
} else { } else {
summary += '\n\nRE: ...'; summary += '\n\nRE: ...';
@ -48,7 +48,7 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
// Renoteのとき // Renoteのとき
if (note.renoteId) { if (note.renoteId) {
if (note.renote) { if (note.renote && !note.cw) {
summary += `\n\nRN: ${getNoteSummary(note.renote)}`; summary += `\n\nRN: ${getNoteSummary(note.renote)}`;
} else { } else {
summary += '\n\nRN: ...'; summary += '\n\nRN: ...';

View File

@ -44,7 +44,7 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
// 返信のとき // 返信のとき
if (note.replyId) { if (note.replyId) {
if (note.reply) { if (note.reply && !note.cw) {
summary += `\n\nRE: ${getNoteSummary(note.reply)}`; summary += `\n\nRE: ${getNoteSummary(note.reply)}`;
} else { } else {
summary += '\n\nRE: ...'; summary += '\n\nRE: ...';
@ -53,7 +53,7 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
// Renoteのとき // Renoteのとき
if (note.renoteId) { if (note.renoteId) {
if (note.renote) { if (note.renote && !note.cw) {
summary += `\n\nRN: ${getNoteSummary(note.renote)}`; summary += `\n\nRN: ${getNoteSummary(note.renote)}`;
} else { } else {
summary += '\n\nRN: ...'; summary += '\n\nRN: ...';