1
0
mirror of https://github.com/spacebarchat/server.git synced 2024-11-12 13:42:47 +01:00
This commit is contained in:
Madeline 2023-08-15 00:12:04 +10:00
parent 99b2e905ad
commit cb1dbd83e2
No known key found for this signature in database
GPG Key ID: 1958E017C36F2E47
2 changed files with 2 additions and 2 deletions

View File

@ -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({

View File

@ -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;
}