feat: added quotesProps to fetchmessage results types

pull/2757/head
William Grant 2 years ago
parent 279642dff3
commit 3dc809783c

@ -417,6 +417,7 @@ export type SortedMessageModelProps = MessageModelPropsWithoutConvoProps & {
type FetchedTopMessageResults = { type FetchedTopMessageResults = {
conversationKey: string; conversationKey: string;
messagesProps: Array<MessageModelPropsWithoutConvoProps>; messagesProps: Array<MessageModelPropsWithoutConvoProps>;
quotesProps: QuoteLookupType;
oldTopMessageId: string | null; oldTopMessageId: string | null;
newMostRecentMessageIdInConversation: string | null; newMostRecentMessageIdInConversation: string | null;
} | null; } | null;
@ -438,7 +439,7 @@ export const fetchTopMessagesForConversation = createAsyncThunk(
window.log.info('fetchTopMessagesForConversation: we are already at the top'); window.log.info('fetchTopMessagesForConversation: we are already at the top');
return null; return null;
} }
const { messagesProps } = await getMessages({ const { messagesProps, quotesProps } = await getMessages({
conversationKey, conversationKey,
messageId: oldTopMessageId, messageId: oldTopMessageId,
}); });
@ -446,6 +447,7 @@ export const fetchTopMessagesForConversation = createAsyncThunk(
return { return {
conversationKey, conversationKey,
messagesProps, messagesProps,
quotesProps,
oldTopMessageId, oldTopMessageId,
newMostRecentMessageIdInConversation: mostRecentMessage?.id || null, newMostRecentMessageIdInConversation: mostRecentMessage?.id || null,
}; };
@ -455,6 +457,7 @@ export const fetchTopMessagesForConversation = createAsyncThunk(
type FetchedBottomMessageResults = { type FetchedBottomMessageResults = {
conversationKey: string; conversationKey: string;
messagesProps: Array<MessageModelPropsWithoutConvoProps>; messagesProps: Array<MessageModelPropsWithoutConvoProps>;
quotesProps: QuoteLookupType;
oldBottomMessageId: string | null; oldBottomMessageId: string | null;
newMostRecentMessageIdInConversation: string | null; newMostRecentMessageIdInConversation: string | null;
} | null; } | null;
@ -475,7 +478,7 @@ export const fetchBottomMessagesForConversation = createAsyncThunk(
window.log.info('fetchBottomMessagesForConversation: we are already at the bottom'); window.log.info('fetchBottomMessagesForConversation: we are already at the bottom');
return null; return null;
} }
const { messagesProps } = await getMessages({ const { messagesProps, quotesProps } = await getMessages({
conversationKey, conversationKey,
messageId: oldBottomMessageId, messageId: oldBottomMessageId,
}); });
@ -483,6 +486,7 @@ export const fetchBottomMessagesForConversation = createAsyncThunk(
return { return {
conversationKey, conversationKey,
messagesProps, messagesProps,
quotesProps,
oldBottomMessageId, oldBottomMessageId,
newMostRecentMessageIdInConversation: mostRecentMessage.id, newMostRecentMessageIdInConversation: mostRecentMessage.id,
}; };

Loading…
Cancel
Save