From 9173be686c1df9adc6cbb9cc2175f8909a868c35 Mon Sep 17 00:00:00 2001
From: Eric Bailey <git@esb.lol>
Date: Tue, 14 May 2024 09:22:09 -0500
Subject: [🐴] Swap in new package, update usages (#3992)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* Swap in new package, update usages

* Remove uneccessary patch

* Override type in safe place
---
 src/state/messages/convo/index.tsx | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

(limited to 'src/state/messages/convo/index.tsx')

diff --git a/src/state/messages/convo/index.tsx b/src/state/messages/convo/index.tsx
index 311e8ce05..9c5295832 100644
--- a/src/state/messages/convo/index.tsx
+++ b/src/state/messages/convo/index.tsx
@@ -1,6 +1,5 @@
 import React, {useContext, useState, useSyncExternalStore} from 'react'
 import {AppState} from 'react-native'
-import {BskyAgent} from '@atproto-labs/api'
 import {useFocusEffect, useIsFocused} from '@react-navigation/native'
 
 import {Convo} from '#/state/messages/convo/agent'
@@ -8,7 +7,6 @@ import {ConvoParams, ConvoState} from '#/state/messages/convo/types'
 import {useMessagesEventBus} from '#/state/messages/events'
 import {useMarkAsReadMutation} from '#/state/queries/messages/conversation'
 import {useAgent} from '#/state/session'
-import {useDmServiceUrlStorage} from '#/screens/Messages/Temp/useDmServiceUrlStorage'
 
 const ChatContext = React.createContext<ConvoState | null>(null)
 
@@ -25,18 +23,14 @@ export function ConvoProvider({
   convoId,
 }: Pick<ConvoParams, 'convoId'> & {children: React.ReactNode}) {
   const isScreenFocused = useIsFocused()
-  const {serviceUrl} = useDmServiceUrlStorage()
   const {getAgent} = useAgent()
   const events = useMessagesEventBus()
   const [convo] = useState(
     () =>
       new Convo({
         convoId,
-        agent: new BskyAgent({
-          service: serviceUrl,
-        }),
+        agent: getAgent(),
         events,
-        __tempFromUserDid: getAgent().session?.did!,
       }),
   )
   const service = useSyncExternalStore(convo.subscribe, convo.getSnapshot)
-- 
cgit 1.4.1

