Add link embeds to posts
This commit is contained in:
parent
89638dbd18
commit
f5ff0fd274
8 changed files with 178 additions and 4 deletions
|
|
@ -209,8 +209,12 @@ export function toShareUrl(url: string): string {
|
|||
return url
|
||||
}
|
||||
|
||||
export function isBskyAppUrl(url: string): boolean {
|
||||
return url.startsWith('https://bsky.app/')
|
||||
}
|
||||
|
||||
export function convertBskyAppUrlIfNeeded(url: string): string {
|
||||
if (url.startsWith('https://bsky.app/')) {
|
||||
if (isBskyAppUrl(url)) {
|
||||
try {
|
||||
const urlp = new URL(url)
|
||||
return urlp.pathname
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue