fix: douban people status: case of parent status deleted but parent_status is not null (#6302)
This commit is contained in:
parent
ca6e8b6c91
commit
db0575db79
|
|
@ -196,12 +196,12 @@ function getContentByActivity(ctx, item, params = {}, picsPrefixes = []) {
|
|||
let usernameAndAvatar = '';
|
||||
|
||||
if (readable) {
|
||||
usernameAndAvatar += `<a href="${status.parent_status.author.url}">`;
|
||||
usernameAndAvatar += `<a href="${status.parent_status.author === undefined ? 'https://www.douban.com/people/1/' : status.parent_status.author.url}">`;
|
||||
}
|
||||
if (authorNameBold) {
|
||||
usernameAndAvatar += `<strong>`;
|
||||
}
|
||||
usernameAndAvatar += status.parent_status.author.name;
|
||||
usernameAndAvatar += status.parent_status.author === undefined ? '[原转发不可访问]' : status.parent_status.author.name;
|
||||
if (authorNameBold) {
|
||||
usernameAndAvatar += `</strong>`;
|
||||
}
|
||||
|
|
@ -209,9 +209,9 @@ function getContentByActivity(ctx, item, params = {}, picsPrefixes = []) {
|
|||
usernameAndAvatar += `</a>`;
|
||||
}
|
||||
usernameAndAvatar += `: `;
|
||||
description += usernameAndAvatar + status.parent_status.text;
|
||||
description += usernameAndAvatar + (status.parent_status.text === undefined ? '[原转发不可访问]' : status.parent_status.text);
|
||||
if (showRetweetTextInTitle) {
|
||||
title += status.parent_status.author.name + ': ' + status.parent_status.text;
|
||||
title += status.parent_status.text === undefined ? '[原转发不可访问]' : status.parent_status.author.name + ': ' + status.parent_status.text;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -268,8 +268,8 @@ function getContentByActivity(ctx, item, params = {}, picsPrefixes = []) {
|
|||
}
|
||||
|
||||
if (status.reshared_status.deleted) {
|
||||
description += `原动态不可访问`;
|
||||
title += `原动态不可访问`;
|
||||
description += `[原动态不可访问]`;
|
||||
title += `[原动态不可访问]`;
|
||||
} else {
|
||||
description += getContentByActivity(
|
||||
ctx,
|
||||
|
|
|
|||
Loading…
Reference in New Issue