mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-29 09:23:04 +00:00
respect CWs in note summaries
This commit is contained in:
parent
c224ed031f
commit
34aeeb0862
2 changed files with 12 additions and 8 deletions
|
@ -18,13 +18,15 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
|
|||
return '(⛔)';
|
||||
}
|
||||
|
||||
if (note.cw != null) {
|
||||
return `CW: ${note.cw}`;
|
||||
}
|
||||
|
||||
let summary = '';
|
||||
|
||||
// 本文
|
||||
if (note.cw != null) {
|
||||
summary += note.cw;
|
||||
} else {
|
||||
summary += note.text ? note.text : '';
|
||||
if (note.text) {
|
||||
summary += note.text;
|
||||
}
|
||||
|
||||
// ファイルが添付されているとき
|
||||
|
|
|
@ -23,13 +23,15 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
|
|||
return `(${i18n.ts.invisibleNote})`;
|
||||
}
|
||||
|
||||
if (note.cw != null) {
|
||||
return `CW: ${note.cw}`;
|
||||
}
|
||||
|
||||
let summary = '';
|
||||
|
||||
// 本文
|
||||
if (note.cw != null) {
|
||||
summary += note.cw;
|
||||
} else {
|
||||
summary += note.text ? note.text : '';
|
||||
if (note.text) {
|
||||
summary += note.text;
|
||||
}
|
||||
|
||||
// ファイルが添付されているとき
|
||||
|
|
Loading…
Reference in a new issue