Adds logic around downloading stories

This commit is contained in:
Josh Perez 2022-03-28 21:10:08 -04:00 committed by GitHub
parent 9d3f0072a5
commit 3b5cc26fec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
29 changed files with 645 additions and 149 deletions

View file

@ -212,6 +212,7 @@ const dataInterface: ClientInterface = {
searchMessagesInConversation,
getMessageCount,
getStoryCount,
saveMessage,
saveMessages,
removeMessage,
@ -295,6 +296,7 @@ const dataInterface: ClientInterface = {
_deleteAllStoryReads,
addNewStoryRead,
getLastStoryReadsForAuthor,
countStoryReadsByConversation,
removeAll,
removeAllConfiguration,
@ -1078,6 +1080,10 @@ async function getMessageCount(conversationId?: string) {
return channels.getMessageCount(conversationId);
}
async function getStoryCount(conversationId: string) {
return channels.getStoryCount(conversationId);
}
async function saveMessage(
data: MessageType,
options: {
@ -1633,6 +1639,11 @@ async function getLastStoryReadsForAuthor(options: {
}): Promise<Array<StoryReadType>> {
return channels.getLastStoryReadsForAuthor(options);
}
async function countStoryReadsByConversation(
conversationId: string
): Promise<number> {
return channels.countStoryReadsByConversation(conversationId);
}
// Other