Skip to content

Commit

Permalink
Fix quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon committed Oct 6, 2024
1 parent fb9c9e4 commit bf00e09
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/view/com/composer/state/composer.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import {ImagePickerAsset} from 'expo-image-picker'

import {isBskyPostUrl} from '#/lib/strings/url-helpers'
import {
isBskyPostUrl,
postUriToRelativePath,
toBskyAppUrl,
} from '#/lib/strings/url-helpers'
import {ComposerImage, createInitialImages} from '#/state/gallery'
import {Gif} from '#/state/queries/tenor'
import {ComposerOpts} from '#/state/shell/composer'
Expand Down Expand Up @@ -304,9 +308,13 @@ export function createComposerState({
}
let quote: Link | undefined
if (initQuoteUri) {
quote = {
type: 'link',
uri: initQuoteUri,
// TODO: Consider passing the app url directly.
const path = postUriToRelativePath(initQuoteUri)
if (path) {
quote = {
type: 'link',
uri: toBskyAppUrl(path),
}
}
}
// TODO: Other initial content.
Expand Down

0 comments on commit bf00e09

Please sign in to comment.