mirror of
https://github.com/paricafe/misskey.git
synced 2024-11-28 04:56:44 -06:00
backend: tweak get-note-summary
This commit is contained in:
parent
1f85626fad
commit
ad51752f38
1 changed files with 4 additions and 4 deletions
|
@ -22,8 +22,8 @@ export const getNoteSummary = (note: Packed<'Note'>): string => {
|
||||||
|
|
||||||
// 本文
|
// 本文
|
||||||
if (note.cw != null) {
|
if (note.cw != null) {
|
||||||
summary += note.cw;
|
summary += `CW: ${note.cw}`;
|
||||||
} else {
|
} else if (note.text) {
|
||||||
summary += note.text ? note.text : '';
|
summary += note.text ? note.text : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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: ...';
|
||||||
|
|
Loading…
Reference in a new issue