rename missing envelope type FR to SESSION_REQUEST

pull/1178/head
Audric Ackermann 5 years ago
parent 38f64cf172
commit f500fed69c
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -153,7 +153,7 @@
ivAndCiphertext
).toString('binary');
return {
type: textsecure.protobuf.Envelope.Type.FRIEND_REQUEST,
type: textsecure.protobuf.Envelope.Type.SESSION_REQUEST,
body: binaryIvAndCiphertext,
registrationId: undefined,
};

@ -24,7 +24,7 @@ describe('Crypto', () => {
const { type } = await fallbackCipher.encrypt(buffer);
assert.strictEqual(
type,
textsecure.protobuf.Envelope.Type.FRIEND_REQUEST
textsecure.protobuf.Envelope.Type.SESSION_REQUEST
);
});

@ -744,7 +744,7 @@ MessageReceiver.prototype.extend({
case textsecure.protobuf.Envelope.Type.MEDIUM_GROUP_CIPHERTEXT:
promise = this.decryptForMediumGroup(envelope, ciphertext);
break;
case textsecure.protobuf.Envelope.Type.FRIEND_REQUEST: {
case textsecure.protobuf.Envelope.Type.SESSION_REQUEST: {
window.log.info('friend-request message from ', envelope.source);
const fallBackSessionCipher = new libloki.crypto.FallBackSessionCipher(
@ -784,10 +784,10 @@ MessageReceiver.prototype.extend({
}
// We might have substituted the type based on decrypted content
if (type === textsecure.protobuf.Envelope.Type.FRIEND_REQUEST) {
if (type === textsecure.protobuf.Envelope.Type.SESSION_REQUEST) {
// eslint-disable-next-line no-param-reassign
envelope.type =
textsecure.protobuf.Envelope.Type.FRIEND_REQUEST;
textsecure.protobuf.Envelope.Type.SESSION_REQUEST;
}
if (this.isBlocked(sender.getName())) {

@ -1178,7 +1178,7 @@ MessageSender.prototype = {
};
// Loki - Temp hack for new protocol
// A session reset should be a `FRIEND_REQUEST`
// A session reset should be a `SESSION_REQUEST`
const msgOptions = {
messageType: 'friend-request',
...options,

Loading…
Cancel
Save