mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 16:46:12 +01:00
fix: better handling for remote posts that do not contain content
This commit is contained in:
@@ -123,8 +123,12 @@ Mocks.post = async (objects) => {
|
||||
let edited = new Date(updated);
|
||||
edited = Number.isNaN(edited.valueOf()) ? undefined : edited;
|
||||
|
||||
content = sanitize(content, sanitizeConfig);
|
||||
content = await activitypub.helpers.remoteAnchorToLocalProfile(content);
|
||||
if (content && content.length) {
|
||||
content = sanitize(content, sanitizeConfig);
|
||||
content = await activitypub.helpers.remoteAnchorToLocalProfile(content);
|
||||
} else {
|
||||
content = '<em>This post did not contain any content.</em>';
|
||||
}
|
||||
|
||||
const payload = {
|
||||
uid,
|
||||
|
||||
Reference in New Issue
Block a user