From 945454038531faac69b4d31f113bd1f589a9e3fb Mon Sep 17 00:00:00 2001 From: Laura Hausmann Date: Sat, 30 Sep 2023 18:35:14 +0200 Subject: [PATCH] [mastodon-client] Return status.edited_at --- packages/backend/src/server/api/mastodon/converters/note.ts | 1 + packages/backend/src/server/api/mastodon/entities/status.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/backend/src/server/api/mastodon/converters/note.ts b/packages/backend/src/server/api/mastodon/converters/note.ts index a592529cf..ac6244a69 100644 --- a/packages/backend/src/server/api/mastodon/converters/note.ts +++ b/packages/backend/src/server/api/mastodon/converters/note.ts @@ -128,6 +128,7 @@ export class NoteConverter { reactions: [], //FIXME: this.mapReactions(n.emojis, n.reactions, n.myReaction), bookmarked: isBookmarked, quote: Promise.resolve(renote).then(renote => renote && note.text !== null ? this.encode(renote, user, cache) : null), + edited_at: note.updatedAt?.toISOString() }); } diff --git a/packages/backend/src/server/api/mastodon/entities/status.ts b/packages/backend/src/server/api/mastodon/entities/status.ts index 720d32c8b..b6112c64c 100644 --- a/packages/backend/src/server/api/mastodon/entities/status.ts +++ b/packages/backend/src/server/api/mastodon/entities/status.ts @@ -41,6 +41,7 @@ namespace MastodonEntity { reactions: Array; quote: Status | null; bookmarked: boolean; + edited_at: string | null; }; export type StatusCreationRequest = {