Use timestamp instead of full model for tap-to-view age outs

This commit is contained in:
Evan Hahn 2021-05-19 11:17:51 -05:00 committed by Scott Nonnenberg
parent 80da8bb47b
commit f3e207d0b0
4 changed files with 15 additions and 30 deletions

View file

@ -229,6 +229,7 @@ export type DataInterface = {
obsoleteId: string,
currentId: string
) => Promise<void>;
getNextTapToViewMessageTimestampToAgeOut: () => Promise<undefined | number>;
getUnprocessedCount: () => Promise<number>;
getAllUnprocessed: () => Promise<Array<UnprocessedType>>;
@ -359,7 +360,6 @@ export type ServerInterface = DataInterface & {
ourConversationId: string;
}) => Promise<MessageType | undefined>;
getNextExpiringMessage: () => Promise<MessageType | undefined>;
getNextTapToViewMessageToAgeOut: () => Promise<MessageType | undefined>;
getOutgoingWithoutExpiresAt: () => Promise<Array<MessageType>>;
getTapToViewMessagesNeedingErase: () => Promise<Array<MessageType>>;
getUnreadCountForConversation: (conversationId: string) => Promise<number>;
@ -497,9 +497,6 @@ export type ClientInterface = DataInterface & {
getNextExpiringMessage: (options: {
Message: typeof MessageModel;
}) => Promise<MessageModel | null>;
getNextTapToViewMessageToAgeOut: (options: {
Message: typeof MessageModel;
}) => Promise<MessageModel | null>;
getOutgoingWithoutExpiresAt: (options: {
MessageCollection: typeof MessageModelCollectionType;
}) => Promise<MessageModelCollectionType>;