mirror of https://git.lenooby09.tech/LeNooby09/social-app.git
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

suggestions (#7382)

* suggestions

* Revert unneeded changes

---------

Co-authored-by: Eric Bailey <git@esb.lol>

authored by

Matthieu Sieben
Eric Bailey
and committed by
Eric Bailey
31ae1859 09cb5aa5

+14 -11
+9
src/lib/strings/embed-player.ts
··· 568 568 dimensions, 569 569 } 570 570 } 571 + 572 + export function isTenorGifUri(url: URL | string) { 573 + try { 574 + return parseTenorGif(typeof url === 'string' ? new URL(url) : url).success 575 + } catch { 576 + // Invalid URL 577 + return false 578 + } 579 + }
+1 -5
src/screens/Messages/components/MessageInputEmbed.tsx
··· 111 111 ) 112 112 113 113 const {rt, record} = useMemo(() => { 114 - if ( 115 - post && 116 - AppBskyFeedPost.isRecord(post.record) && 117 - AppBskyFeedPost.validateRecord(post.record).success 118 - ) { 114 + if (post && AppBskyFeedPost.isValidRecord(post.record)) { 119 115 return { 120 116 rt: new RichTextAPI({ 121 117 text: post.record.text,
+2 -2
src/types/atproto/index.ts
··· 16 16 * } 17 17 * ``` 18 18 */ 19 - export function fastIsType<R>( 19 + export function fastIsType<R extends {$type?: string}>( 20 20 record: unknown, 21 - identity: <V>(v: V) => boolean, 21 + identity: <V>(v: V) => v is V & {$type: NonNullable<R['$type']>}, 22 22 ): record is R { 23 23 return identity(record) 24 24 }
+2 -4
src/types/atproto/profile.ts
··· 42 42 associated: view.associated, 43 43 viewer: view.viewer, 44 44 labels: view.labels, 45 - // @ts-expect-error `createdAt` doesn't exist on chat view 46 - createdAt: ChatBskyActorDefs.isProfileViewBasic(view) 47 - ? undefined 48 - : view.createdAt, 45 + // `createdAt` doesn't exist in ChatBskyActorDefs.ProfileViewBasic 46 + createdAt: 'createdAt' in view ? view.createdAt : undefined, 49 47 } 50 48 } 51 49