diff options
author | Eric Bailey <git@esb.lol> | 2024-05-14 09:22:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-14 09:22:09 -0500 |
commit | 9173be686c1df9adc6cbb9cc2175f8909a868c35 (patch) | |
tree | 25ea67a686969a086249769a1a3a445cd819a9ff /src/state/messages/convo/index.tsx | |
parent | 107760d551dee695f76409337048cd8c7917b784 (diff) | |
download | voidsky-9173be686c1df9adc6cbb9cc2175f8909a868c35.tar.zst |
[🐴] Swap in new package, update usages (#3992)
* Swap in new package, update usages * Remove uneccessary patch * Override type in safe place
Diffstat (limited to 'src/state/messages/convo/index.tsx')
-rw-r--r-- | src/state/messages/convo/index.tsx | 8 |
1 files changed, 1 insertions, 7 deletions
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) |