about summary refs log tree commit diff
path: root/src/state/shell
diff options
context:
space:
mode:
authordan <dan.abramov@gmail.com>2024-10-24 20:41:50 +0100
committerGitHub <noreply@github.com>2024-10-24 20:41:50 +0100
commite8a53dcea84afc3b313037dbaf059c68121eb9ab (patch)
tree43593f5bb5ab852b6c61244167d5ead31c8ec125 /src/state/shell
parentfa4cca11fedb78b31b7b606eafa74ebc17435f24 (diff)
downloadvoidsky-e8a53dcea84afc3b313037dbaf059c68121eb9ab.tar.zst
Refactor post meta to return PostView (#5645)
Diffstat (limited to 'src/state/shell')
-rw-r--r--src/state/shell/composer/index.tsx21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/state/shell/composer/index.tsx b/src/state/shell/composer/index.tsx
index 096948506..dc9a7d880 100644
--- a/src/state/shell/composer/index.tsx
+++ b/src/state/shell/composer/index.tsx
@@ -2,7 +2,7 @@ import React from 'react'
 import {
   AppBskyActorDefs,
   AppBskyEmbedRecord,
-  AppBskyRichtextFacet,
+  AppBskyFeedDefs,
   ModerationDecision,
 } from '@atproto/api'
 import {msg} from '@lingui/macro'
@@ -23,20 +23,11 @@ export interface ComposerOptsPostRef {
   embed?: AppBskyEmbedRecord.ViewRecord['embed']
   moderation?: ModerationDecision
 }
-export interface ComposerOptsQuote {
-  uri: string
-  cid: string
-  text: string
-  facets?: AppBskyRichtextFacet.Main[]
-  indexedAt: string
-  author: AppBskyActorDefs.ProfileViewBasic
-  embeds?: AppBskyEmbedRecord.ViewRecord['embeds']
-}
+
 export interface ComposerOpts {
   replyTo?: ComposerOptsPostRef
   onPost?: (postUri: string | undefined) => void
-  quote?: ComposerOptsQuote
-  quoteCount?: number
+  quote?: AppBskyFeedDefs.PostView
   mention?: string // handle of user to mention
   openEmojiPicker?: (pos: DOMRect | undefined) => void
   text?: string
@@ -75,11 +66,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
             cid: opts.quote.cid,
             uri: opts.quote.uri,
           },
-          meta: {
-            author: opts.quote.author,
-            indexedAt: opts.quote.indexedAt,
-            text: opts.quote.text,
-          },
+          meta: opts.quote,
         })
       }
     }