2 files changed, 2 insertions, 2 deletions
diff --git a/src/activitypub/routes/channel/#channel_id/inbox.ts b/src/activitypub/routes/channel/#channel_id/inbox.ts
index 073c1d0b..ee7f4519 100644
--- a/src/activitypub/routes/channel/#channel_id/inbox.ts
+++ b/src/activitypub/routes/channel/#channel_id/inbox.ts
@@ -11,7 +11,7 @@ router.post("/", route({}), async (req, res) => {
if (body.type != "Create") throw new HTTPError("not implemented");
- const message = await Message.fromAP(body);
+ const message = await Message.fromAP(body.object);
await message.save();
await emitEvent({
diff --git a/src/util/entities/User.ts b/src/util/entities/User.ts
index 59713bce..d602a750 100644
--- a/src/util/entities/User.ts
+++ b/src/util/entities/User.ts
@@ -326,7 +326,7 @@ export class User extends BaseClass {
static async fromAP(data: APPerson | string): Promise<User> {
if (typeof data == "string") {
data = (await fetch(data, {
- headers: { Accept: "application/activity+json" },
+ headers: { Accept: "application/json" },
}).then((x) => x.json())) as APPerson;
}
|