mirror of
https://activitypub.software/TransFem-org/Sharkey.git
synced 2024-12-15 00:55:48 +01:00
preserve non-text details in note summaries
This commit is contained in:
parent
94ce7272a7
commit
cb10fe91bb
2 changed files with 6 additions and 10 deletions
|
@ -18,14 +18,12 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
|
||||||
return '(⛔)';
|
return '(⛔)';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.cw != null) {
|
|
||||||
return `CW: ${note.cw}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
let summary = '';
|
let summary = '';
|
||||||
|
|
||||||
// 本文
|
// 本文
|
||||||
if (note.text) {
|
if (note.cw != null) {
|
||||||
|
summary += `CW: ${note.cw}`;
|
||||||
|
} else if (note.text) {
|
||||||
summary += note.text;
|
summary += note.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,12 @@ export const getNoteSummary = (note?: Misskey.entities.Note | null): string => {
|
||||||
return `(${i18n.ts.invisibleNote})`;
|
return `(${i18n.ts.invisibleNote})`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.cw != null) {
|
|
||||||
return `CW: ${note.cw}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
let summary = '';
|
let summary = '';
|
||||||
|
|
||||||
// 本文
|
// 本文
|
||||||
if (note.text) {
|
if (note.cw != null) {
|
||||||
|
summary += `CW: ${note.cw}`;
|
||||||
|
} else if (note.text) {
|
||||||
summary += note.text;
|
summary += note.text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue