mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-23 09:58:12 +01:00
Save group send endorsements
This commit is contained in:
@@ -727,14 +727,22 @@ export type GetGroupLogOptionsType = Readonly<{
|
||||
includeFirstState: boolean;
|
||||
includeLastState: boolean;
|
||||
maxSupportedChangeEpoch: number;
|
||||
cachedEndorsementsExpiration: number | null; // seconds
|
||||
}>;
|
||||
export type GroupLogResponseType = {
|
||||
currentRevision?: number;
|
||||
start?: number;
|
||||
end?: number;
|
||||
changes: Proto.GroupChanges;
|
||||
groupSendEndorsementResponse: Uint8Array | null;
|
||||
};
|
||||
} & (
|
||||
| {
|
||||
paginated: false;
|
||||
}
|
||||
| {
|
||||
paginated: true;
|
||||
currentRevision: number;
|
||||
start: number;
|
||||
end: number;
|
||||
}
|
||||
);
|
||||
|
||||
export type ProfileRequestDataType = {
|
||||
about: string | null;
|
||||
@@ -3901,6 +3909,7 @@ export function initialize({
|
||||
includeFirstState,
|
||||
includeLastState,
|
||||
maxSupportedChangeEpoch,
|
||||
cachedEndorsementsExpiration,
|
||||
} = options;
|
||||
|
||||
// If we don't know starting revision - fetch it from the server
|
||||
@@ -3935,8 +3944,7 @@ export function initialize({
|
||||
httpType: 'GET',
|
||||
responseType: 'byteswithdetails',
|
||||
headers: {
|
||||
// TODO(jamie): To be implmented in DESKTOP-699
|
||||
'Cached-Send-Endorsements': '0',
|
||||
'Cached-Send-Endorsements': String(cachedEndorsementsExpiration ?? 0),
|
||||
},
|
||||
urlParameters:
|
||||
`/${startVersion}?` +
|
||||
@@ -3963,6 +3971,7 @@ export function initialize({
|
||||
isNumber(currentRevision)
|
||||
) {
|
||||
return {
|
||||
paginated: true,
|
||||
changes,
|
||||
start,
|
||||
end,
|
||||
@@ -3973,6 +3982,7 @@ export function initialize({
|
||||
}
|
||||
|
||||
return {
|
||||
paginated: false,
|
||||
changes,
|
||||
groupSendEndorsementResponse,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user