- useConversation(): {
getByTopic: ((topic: string) => Promise<undefined | Conversation<any>>);
getCachedByPeerAddress: ((peerAddress: string) => Promise<undefined | CachedConversation<ContentTypeMetadata>>);
getCachedByTopic: ((topic: string) => Promise<undefined | CachedConversation<ContentTypeMetadata>>);
getLastMessage: ((topic: string) => Promise<CachedMessage<any, ContentTypeMetadata>>);
hasConversationTopic: ((topic: string) => Promise<boolean>);
} Returns {
getByTopic: ((topic: string) => Promise<undefined | Conversation<any>>);
getCachedByPeerAddress: ((peerAddress: string) => Promise<undefined | CachedConversation<ContentTypeMetadata>>);
getCachedByTopic: ((topic: string) => Promise<undefined | CachedConversation<ContentTypeMetadata>>);
getLastMessage: ((topic: string) => Promise<CachedMessage<any, ContentTypeMetadata>>);
hasConversationTopic: ((topic: string) => Promise<boolean>);
}
getByTopic: ((topic: string) => Promise<undefined | Conversation<any>>)
- (topic): Promise<undefined | Conversation<any>>
Returns Promise<undefined | Conversation<any>>
hasConversationTopic: ((topic: string) => Promise<boolean>)
- (topic): Promise<boolean>
Returns Promise<boolean>
This hook returns helper functions for working with conversations in the local cache.