fix: dont import serverside bsky uri parsing code to clientside
All checks were successful
create archive with lfs / tag (push) Successful in 10s

This commit is contained in:
dusk 2024-12-16 18:26:00 +03:00
parent ab37a70708
commit 8a6ad6133e
Signed by: dusk
SSH Key Fingerprint: SHA256:Abmvag+juovVufZTxyWY8KcVgrznxvBjQpJesv071Aw
2 changed files with 4 additions and 9 deletions

View File

@ -13,13 +13,6 @@ export const getBskyClient = async () => {
return client
}
export const parseAtUri = (uri: string) => {
if (uri.startsWith("https://bsky.gaze.systems")) {
return uri
}
return `https://bsky.gaze.systems/post/${uri.split('/').pop()}`
}
const loginToBsky = async () => {
const bot = new Bot({ service: "https://bsky.social" })
await bot.login({ identifier: 'gaze.systems', password: env.BSKY_PASSWORD ?? "" })

View File

@ -1,7 +1,6 @@
<script lang="ts">
import Window from '../../components/window.svelte';
import Token from '../../components/token.svelte';
import { parseAtUri } from '$lib/bluesky.js';
export let data;
@ -19,7 +18,10 @@
const getOutgoingLink = (name: string, link: string) => {
if (name === "bsky") {
return parseAtUri(link)
if (link.startsWith("https://bsky.gaze.systems")) {
return link
}
return `https://bsky.gaze.systems/post/${link.split('/').pop()}`
}
return link
}