mirror of
https://codeberg.org/yeentown/barkey
synced 2024-11-25 18:45:13 +00:00
respect CWs in note summaries
This commit is contained in:
parent
ae3863bed0
commit
cf49701c2a
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