refactor: use topics.create internal method instead of directly setting topic hash, handle incoming tags for OP

This commit is contained in:
Julian Lam
2024-02-29 11:19:56 -05:00
parent 1ca9994f43
commit f5a610797c
3 changed files with 26 additions and 23 deletions

View File

@@ -81,17 +81,11 @@ Mocks.post = async (objects) => {
const {
id: pid,
published,
updated,
attributedTo: uid,
// conversation,
name,
content,
sourceContent,
inReplyTo: toPid,
to,
cc,
attachment,
published, updated, name, content, sourceContent,
to, cc, attachment, tag,
// conversation, // mastodon-specific, ignored.
} = object;
const timestamp = new Date(published).getTime();
@@ -110,7 +104,7 @@ Mocks.post = async (objects) => {
edited,
editor: edited ? uid : undefined,
_activitypub: { to, cc, attachment },
_activitypub: { to, cc, attachment, tag },
};
return payload;