summaryrefslogtreecommitdiff
path: root/src/remote
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-04-05 00:50:57 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-04-05 00:50:57 +0900
commitfd73fad148a500bd95a575fe6e4b73a25882fb89 (patch)
tree8b83242396d662d82f5633af8bf55559614442b5 /src/remote
parentwip (diff)
downloadmisskey-fd73fad148a500bd95a575fe6e4b73a25882fb89.tar.gz
misskey-fd73fad148a500bd95a575fe6e4b73a25882fb89.tar.bz2
misskey-fd73fad148a500bd95a575fe6e4b73a25882fb89.zip
wip
Diffstat (limited to 'src/remote')
-rw-r--r--src/remote/activitypub/act/create.ts18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/remote/activitypub/act/create.ts b/src/remote/activitypub/act/create.ts
index 7ee9f8dfb7..957900900f 100644
--- a/src/remote/activitypub/act/create.ts
+++ b/src/remote/activitypub/act/create.ts
@@ -63,32 +63,26 @@ export default async (actor, activity): Promise<void> => {
throw new Error('invalid note');
}
- const mediaIds = [];
+ const media = [];
if ('attachment' in note) {
note.attachment.forEach(async media => {
const created = await createImage(resolver, media);
- mediaIds.push(created._id);
+ media.push(created);
});
}
const { window } = new JSDOM(note.content);
await createPost(actor, {
- channelId: undefined,
- index: undefined,
createdAt: new Date(note.published),
- mediaIds,
- replyId: undefined,
- repostId: undefined,
- poll: undefined,
+ media,
+ reply: undefined,
+ repost: undefined,
text: window.document.body.textContent,
- textHtml: note.content && createDOMPurify(window).sanitize(note.content),
- userId: actor._id,
- appId: null,
viaMobile: false,
geo: undefined,
uri: note.id
- }, null, null, []);
+ });
}
};