mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-25 11:43:07 +01:00
ahhhh
This commit is contained in:
parent
99b2e905ad
commit
cb1dbd83e2
@ -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({
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user