From cdcd4320a920c20c8d7a27b6d5d4de18cf3bcf02 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 24 Mar 2023 13:14:41 -0700 Subject: [PATCH] fix? --- .../backend/src/server/api/mastodon/endpoints/status.ts | 2 +- .../src/server/api/mastodon/endpoints/timeline.ts | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/mastodon/endpoints/status.ts b/packages/backend/src/server/api/mastodon/endpoints/status.ts index 38199740a..6494ad5a6 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/status.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/status.ts @@ -46,7 +46,7 @@ export function apiStatusMastodon(router: Router): void { } } if (!body.media_ids) body.media_ids = undefined; - if (body.media_ids && !body.media_ids.length) body.media_ids = undefined; + if (body.media_ids && !body.media_ids.length) body.media_ids = undefined; const { sensitive } = body body.sensitive = typeof sensitive === 'string' ? sensitive === 'true' : sensitive const data = await client.postStatus(text, body); diff --git a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts index 23729e480..0393a206c 100644 --- a/packages/backend/src/server/api/mastodon/endpoints/timeline.ts +++ b/packages/backend/src/server/api/mastodon/endpoints/timeline.ts @@ -43,10 +43,11 @@ export function toTextWithReaction(status: Entity.Status[], host: string) { for (const r of reaction) { if (!r.url) continue emoji.push({ - 'shortcode': r.name, - 'url': r.url, - 'static_url': r.url, - 'visible_in_picker': true, + 'shortcode': r.name, + 'url': r.url, + 'static_url': r.url, + 'visible_in_picker': true, + category: "" },) } const isMe = reaction.findIndex((r) => r.me) > -1;