From 64165beda254ae36b8b16d08361baf3631ef6b0e Mon Sep 17 00:00:00 2001 From: diondiondion Date: Thu, 7 May 2026 12:27:24 +0200 Subject: [PATCH] [Glitch] Fix collection sharing/link copying using the local/relative collection URL Port 9c8e1855a53a3b1a634f1ecba54ab56db6bf404f to glitch-soc Signed-off-by: Claire --- .../features/collections/components/collection_menu.tsx | 5 +++-- .../glitch/features/collections/components/share_modal.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx b/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx index da3c5b2481..709fd1a522 100644 --- a/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx +++ b/app/javascript/flavours/glitch/features/collections/components/collection_menu.tsx @@ -131,7 +131,7 @@ export const CollectionMenu: React.FC<{ { text: intl.formatMessage(messages.copyLink), action: () => { - void navigator.clipboard.writeText(getCollectionPath(id)); + void navigator.clipboard.writeText(collection.url); dispatch(showAlert({ message: messages.copyLinkConfirmation })); }, }, @@ -196,13 +196,14 @@ export const CollectionMenu: React.FC<{ id, openShareModal, isOwnCollection, + collection.url, dispatch, openDeleteConfirmation, context, currentAccountInCollection, openReportModal, - openBlockModal, openRevokeConfirmation, + openBlockModal, ]); return ( diff --git a/app/javascript/flavours/glitch/features/collections/components/share_modal.tsx b/app/javascript/flavours/glitch/features/collections/components/share_modal.tsx index 91c3a45e8b..2fccae2df7 100644 --- a/app/javascript/flavours/glitch/features/collections/components/share_modal.tsx +++ b/app/javascript/flavours/glitch/features/collections/components/share_modal.tsx @@ -42,7 +42,7 @@ export const CollectionShareModal: React.FC<{ const isNew = !!location.state?.newCollection; const isOwnCollection = collection.account_id === me; - const collectionLink = `${window.location.origin}/collections/${collection.id}`; + const collectionLink = collection.url; const handleShareOnDevice = useCallback(() => { void navigator.share({