New getRecentStoryReplies function to clean up replies in multiple convos

This commit is contained in:
Scott Nonnenberg 2023-07-21 15:10:32 -07:00 committed by GitHub
parent ca84d637ae
commit 716f852970
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 356 additions and 63 deletions

View file

@ -36,6 +36,7 @@ import type {
ClientSearchResultMessageType,
ConversationType,
GetConversationRangeCenteredOnMessageResultType,
GetRecentStoryRepliesOptionsType,
IdentityKeyIdType,
IdentityKeyType,
StoredIdentityKeyType,
@ -99,6 +100,7 @@ const exclusiveInterface: ClientExclusiveInterface = {
searchMessages,
getRecentStoryReplies,
getOlderMessagesByConversation,
getConversationRangeCenteredOnMessage,
getNewerMessagesByConversation,
@ -613,6 +615,15 @@ async function getNewerMessagesByConversation(
return handleMessageJSON(messages);
}
async function getRecentStoryReplies(
storyId: string,
options?: GetRecentStoryRepliesOptionsType
): Promise<Array<MessageType>> {
const messages = await channels.getRecentStoryReplies(storyId, options);
return handleMessageJSON(messages);
}
async function getOlderMessagesByConversation(
options: AdjacentMessagesByConversationOptionsType
): Promise<Array<MessageType>> {