From 73e0ed070307af0dfb9674458672dc666c898a62 Mon Sep 17 00:00:00 2001
From: nick-funk
Date: Thu, 28 Nov 2024 14:05:39 -0700
Subject: [PATCH 01/14] update types across the server and client to support
Bluesky
something weird is still going on, the oembeds don't show
up properly in preview or when embedded in the media view
---
.../sections/General/MediaLinksConfig.tsx | 23 +++++++++++
.../client/framework/components/Frame.tsx | 2 +-
.../stream/common/Media/BlueskyMedia.tsx | 30 ++++++++++++++
.../MediaConfirmation/MediaConfirmPrompt.tsx | 18 ++++++++
.../MediaConfirmation/MediaPreview.tsx | 3 ++
.../Stream/CommentForm/CommentForm.tsx | 10 ++++-
.../Stream/CommentForm/MediaField.tsx | 2 +-
.../PostCommentFormContainer.tsx | 3 ++
common/lib/helpers/findMediaLinks.ts | 7 +++-
locales/en-US/stream.ftl | 2 +
.../core/server/app/handlers/api/oembed.ts | 2 +-
.../resolvers/BlueskyMediaConfiguration.ts | 12 ++++++
.../server/graph/resolvers/CommentMedia.ts | 2 +
.../src/core/server/graph/resolvers/index.ts | 2 +
.../core/server/graph/schema/schema.graphql | 41 +++++++++++++++++++
.../core/server/models/comment/revision.ts | 7 ++++
.../src/core/server/models/tenant/helpers.ts | 4 +-
.../core/server/services/comments/media.ts | 32 +++++++++++----
.../src/core/server/services/oembed/oembed.ts | 8 +++-
server/src/core/server/stacks/editComment.ts | 3 +-
20 files changed, 194 insertions(+), 19 deletions(-)
create mode 100644 client/src/core/client/stream/common/Media/BlueskyMedia.tsx
create mode 100644 server/src/core/server/graph/resolvers/BlueskyMediaConfiguration.ts
diff --git a/client/src/core/client/admin/routes/Configure/sections/General/MediaLinksConfig.tsx b/client/src/core/client/admin/routes/Configure/sections/General/MediaLinksConfig.tsx
index 51b7738d1e..d1d5b7d759 100644
--- a/client/src/core/client/admin/routes/Configure/sections/General/MediaLinksConfig.tsx
+++ b/client/src/core/client/admin/routes/Configure/sections/General/MediaLinksConfig.tsx
@@ -41,6 +41,9 @@ graphql`
twitter {
enabled
}
+ bluesky {
+ enabled
+ }
youtube {
enabled
}
@@ -90,6 +93,26 @@ const MediaLinksConfig: FunctionComponent
+ Add this post to the end of your comment? +
+{media.url}
@@ -76,6 +83,17 @@ const MediaConfirmPrompt: FunctionComponent