mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 12:19:41 +00:00
Revert "Refactor outbound delivery state"
This reverts commit 9c48a95eb5.
This commit is contained in:
@@ -15,11 +15,8 @@ import type { ConversationModel } from '../models/conversations';
|
||||
import type { StoredJob } from '../jobs/types';
|
||||
import type { ReactionType } from '../types/Reactions';
|
||||
import type { ConversationColorType, CustomColorType } from '../types/Colors';
|
||||
import type { BodyRangesType } from '../types/Util';
|
||||
import { StorageAccessType } from '../types/Storage.d';
|
||||
import type { AttachmentType } from '../types/Attachment';
|
||||
import type { SendState } from '../messages/MessageSendState';
|
||||
import type { MessageRowWithJoinedSends } from './rowToMessage';
|
||||
|
||||
export type AttachmentDownloadJobTypeType =
|
||||
| 'long-message'
|
||||
@@ -72,17 +69,21 @@ export type ItemType<K extends ItemKeyType> = {
|
||||
value: StorageAccessType[K];
|
||||
};
|
||||
export type MessageType = MessageAttributesType;
|
||||
export type MessageTypeUnhydrated = {
|
||||
json: string;
|
||||
};
|
||||
export type PreKeyType = {
|
||||
id: number;
|
||||
privateKey: ArrayBuffer;
|
||||
publicKey: ArrayBuffer;
|
||||
};
|
||||
export type SearchResultMessageType = MessageRowWithJoinedSends & {
|
||||
export type SearchResultMessageType = {
|
||||
json: string;
|
||||
snippet: string;
|
||||
};
|
||||
export type ClientSearchResultMessageType = MessageType & {
|
||||
json: string;
|
||||
bodyRanges: BodyRangesType;
|
||||
bodyRanges: [];
|
||||
snippet: string;
|
||||
};
|
||||
export type SenderKeyType = {
|
||||
@@ -254,15 +255,6 @@ export type DataInterface = {
|
||||
) => Promise<void>;
|
||||
getNextTapToViewMessageTimestampToAgeOut: () => Promise<undefined | number>;
|
||||
|
||||
updateMessageSendState(
|
||||
params: Readonly<
|
||||
{
|
||||
messageId: string;
|
||||
destinationConversationId: string;
|
||||
} & SendState
|
||||
>
|
||||
): Promise<void>;
|
||||
|
||||
getUnprocessedCount: () => Promise<number>;
|
||||
getAllUnprocessed: () => Promise<Array<UnprocessedType>>;
|
||||
updateUnprocessedAttempts: (id: string, attempts: number) => Promise<void>;
|
||||
@@ -353,20 +345,6 @@ export type DataInterface = {
|
||||
value: CustomColorType;
|
||||
}
|
||||
) => Promise<void>;
|
||||
|
||||
// For testing only
|
||||
|
||||
_getSendStates: (
|
||||
options: Readonly<{
|
||||
messageId: string;
|
||||
destinationConversationId: string;
|
||||
}>
|
||||
) => Promise<
|
||||
Array<{
|
||||
updatedAt: number;
|
||||
status: string;
|
||||
}>
|
||||
>;
|
||||
};
|
||||
|
||||
// The reason for client/server divergence is the need to inject Backbone models and
|
||||
@@ -399,11 +377,11 @@ export type ServerInterface = DataInterface & {
|
||||
sentAt?: number;
|
||||
messageId?: string;
|
||||
}
|
||||
) => Promise<Array<MessageRowWithJoinedSends>>;
|
||||
) => Promise<Array<MessageTypeUnhydrated>>;
|
||||
getNewerMessagesByConversation: (
|
||||
conversationId: string,
|
||||
options?: { limit?: number; receivedAt?: number; sentAt?: number }
|
||||
) => Promise<Array<MessageRowWithJoinedSends>>;
|
||||
) => Promise<Array<MessageTypeUnhydrated>>;
|
||||
getLastConversationActivity: (options: {
|
||||
conversationId: string;
|
||||
ourConversationId: string;
|
||||
|
||||
Reference in New Issue
Block a user