mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-26 19:34:04 +01:00
Receive support for Sender Key
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
@@ -66,6 +66,16 @@ export type ClientSearchResultMessageType = MessageType & {
|
||||
bodyRanges: [];
|
||||
snippet: string;
|
||||
};
|
||||
export type SenderKeyType = {
|
||||
// Primary key
|
||||
id: string;
|
||||
// These two are combined into one string to give us the final id
|
||||
senderId: string;
|
||||
distributionId: string;
|
||||
// Raw data to serialize/deserialize into signal-client SenderKeyRecord
|
||||
data: Buffer;
|
||||
lastUpdatedDate: number;
|
||||
};
|
||||
export type SessionType = {
|
||||
id: string;
|
||||
conversationId: string;
|
||||
@@ -171,6 +181,11 @@ export type DataInterface = {
|
||||
removeAllItems: () => Promise<void>;
|
||||
getAllItems: () => Promise<Array<ItemType>>;
|
||||
|
||||
createOrUpdateSenderKey: (key: SenderKeyType) => Promise<void>;
|
||||
getSenderKeyById: (id: string) => Promise<SenderKeyType | undefined>;
|
||||
removeAllSenderKeys: () => Promise<void>;
|
||||
getAllSenderKeys: () => Promise<Array<SenderKeyType>>;
|
||||
|
||||
createOrUpdateSession: (data: SessionType) => Promise<void>;
|
||||
createOrUpdateSessions: (array: Array<SessionType>) => Promise<void>;
|
||||
getSessionById: (id: string) => Promise<SessionType | undefined>;
|
||||
|
||||
Reference in New Issue
Block a user