From fcbb291ef1bfbfc9804bf7e93025b4d3a907904a Mon Sep 17 00:00:00 2001 From: Mar0xy Date: Thu, 30 Nov 2023 04:01:07 +0100 Subject: [PATCH] upd: pass a few more AP values The added values are all taken from Mastodon code in hope to make editing and everything else sync better --- packages/backend/src/core/activitypub/ApRendererService.ts | 2 ++ packages/backend/src/core/activitypub/type.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/packages/backend/src/core/activitypub/ApRendererService.ts b/packages/backend/src/core/activitypub/ApRendererService.ts index 4d8e075a3..0b904889a 100644 --- a/packages/backend/src/core/activitypub/ApRendererService.ts +++ b/packages/backend/src/core/activitypub/ApRendererService.ts @@ -171,6 +171,7 @@ export class ApRendererService { mediaType: file.webpublicType ?? file.type, url: this.driveFileEntityService.getPublicUrl(file), name: file.comment, + description: file.comment, }; } @@ -746,6 +747,7 @@ export class ApRendererService { summary: summary ?? undefined, content: content ?? undefined, updated: note.updatedAt?.toISOString(), + edited_at: note.updatedAt?.toISOString(), _misskey_content: text, source: { content: text, diff --git a/packages/backend/src/core/activitypub/type.ts b/packages/backend/src/core/activitypub/type.ts index b5ba8cd5a..1ed28f21b 100644 --- a/packages/backend/src/core/activitypub/type.ts +++ b/packages/backend/src/core/activitypub/type.ts @@ -121,6 +121,7 @@ export interface IPost extends IObject { quoteUrl?: string; quoteUri?: string; updated?: string; + edited_at?: string; } export interface IQuestion extends IObject { @@ -249,6 +250,7 @@ export interface IApDocument extends IObject { type: 'Document'; name: string | null; mediaType: string; + description: string | null; } export interface IApImage extends IObject {