Save group send endorsements
This commit is contained in:
parent
dea641bae4
commit
4253bed0bd
12 changed files with 583 additions and 91 deletions
|
@ -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,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue