Skip to content

Commit 76a07d5

Browse files
committed
fix: missing logic in mocks.notes.private that precluded the use of emoji
1 parent 12dab84 commit 76a07d5

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/activitypub/mocks.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,13 @@ Mocks.notes.private = async ({ messageObj }) => {
845845
const published = messageObj.timestampISO;
846846
const updated = messageObj.edited ? messageObj.editedISO : undefined;
847847

848+
const content = await messaging.getMessageField(messageObj.mid, 'content');
849+
messageObj.content = content; // re-send raw content into parsePost
850+
const parsed = await posts.parsePost(messageObj, 'activitypub.note');
851+
messageObj.content = sanitize(parsed.content, sanitizeConfig);
852+
messageObj.content = posts.relativeToAbsolute(messageObj.content, posts.urlRegex);
853+
messageObj.content = posts.relativeToAbsolute(messageObj.content, posts.imgRegex);
854+
848855
let source;
849856
const markdownEnabled = await plugins.isActive('nodebb-plugin-markdown');
850857
if (markdownEnabled) {

0 commit comments

Comments
 (0)