Message Send Log to enable comprehensive resend
This commit is contained in:
parent
0fe68b57b1
commit
a42c41ed01
37 changed files with 3154 additions and 1266 deletions
|
@ -24,6 +24,7 @@ import {
|
|||
typedArrayToArrayBuffer,
|
||||
} from './Crypto';
|
||||
import { assert } from './util/assert';
|
||||
import { handleMessageSend } from './util/handleMessageSend';
|
||||
import { isNotNil } from './util/isNotNil';
|
||||
import { Zone } from './util/Zone';
|
||||
import { isMoreRecentThan } from './util/timestamp';
|
||||
|
@ -590,6 +591,13 @@ export class SignalProtocolStore extends EventsMixin {
|
|||
}
|
||||
}
|
||||
|
||||
async clearSenderKeyStore(): Promise<void> {
|
||||
if (this.senderKeys) {
|
||||
this.senderKeys.clear();
|
||||
}
|
||||
await window.Signal.Data.removeAllSenderKeys();
|
||||
}
|
||||
|
||||
// Session Queue
|
||||
|
||||
async enqueueSessionJob<T>(
|
||||
|
@ -1231,7 +1239,14 @@ export class SignalProtocolStore extends EventsMixin {
|
|||
|
||||
// Send a null message with newly-created session
|
||||
const sendOptions = await getSendOptions(conversation.attributes);
|
||||
await window.textsecure.messaging.sendNullMessage({ uuid }, sendOptions);
|
||||
const result = await handleMessageSend(
|
||||
window.textsecure.messaging.sendNullMessage({ uuid }, sendOptions),
|
||||
{ messageIds: [], sendType: 'nullMessage' }
|
||||
);
|
||||
|
||||
if (result && result.errors && result.errors.length) {
|
||||
throw result.errors[0];
|
||||
}
|
||||
} catch (error) {
|
||||
// If we failed to do the session reset, then we'll allow another attempt sooner
|
||||
// than one hour from now.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue