1 Commits

Author SHA1 Message Date
juni
2b00c72e1c fix: spoilers break embedding 2024-10-27 12:11:22 -04:00
2 changed files with 4 additions and 2 deletions

View File

@@ -29,7 +29,8 @@ export const getPost: Handler<
Env,
'/profile/:user/post/:post' | '/https://bsky.app/profile/:user/post/:post'
> = async (c) => {
const { user, post } = c.req.param();
let { user, post } = c.req.param();
post = post.replaceAll('|', '');
const isDirect = c.req.query('direct');
const agent = c.get('Agent');

View File

@@ -7,7 +7,8 @@ export const getProfile: Handler<
Env,
'/profile/:user' | '/https://bsky.app/profile/:user'
> = async (c) => {
const { user } = c.req.param();
let { user } = c.req.param();
user = user.replaceAll('|', '');
const agent = c.get('Agent');
try {
var { data } = await fetchProfile(agent, { user });