[Glitch] Fix collection sharing/link copying using the local/relative collection URL

Port 9c8e1855a53a3b1a634f1ecba54ab56db6bf404f to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
diondiondion 2026-05-07 12:27:24 +02:00 committed by Claire
parent 9d382bca09
commit 64165beda2
2 changed files with 4 additions and 3 deletions

View File

@ -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 (

View File

@ -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({