Merge commit 'd94365f1c6dbb315f67f29b47982b5f24bd11f5f' into feature/friend-request

pull/33/head
Mikunj 6 years ago
commit 5e48efc935

@ -453,12 +453,12 @@
// listeners
Whisper.RotateSignedPreKeyListener.init(Whisper.events, newVersion);
window.Signal.RefreshSenderCertificate.initialize({
events: Whisper.events,
storage,
navigator,
logger: window.log,
});
// window.Signal.RefreshSenderCertificate.initialize({
// events: Whisper.events,
// storage,
// navigator,
// logger: window.log,
// });
connect(true);
});
@ -478,12 +478,12 @@
} else if (Whisper.Registration.everDone()) {
// listeners
Whisper.RotateSignedPreKeyListener.init(Whisper.events, newVersion);
window.Signal.RefreshSenderCertificate.initialize({
events: Whisper.events,
storage,
navigator,
logger: window.log,
});
// window.Signal.RefreshSenderCertificate.initialize({
// events: Whisper.events,
// storage,
// navigator,
// logger: window.log,
// });
connect();
appView.openInbox({
@ -691,19 +691,19 @@
window.getSyncRequest();
}
const udSupportKey = 'hasRegisterSupportForUnauthenticatedDelivery';
if (!storage.get(udSupportKey)) {
const server = WebAPI.connect({ username: USERNAME, password: PASSWORD });
try {
await server.registerSupportForUnauthenticatedDelivery();
storage.put(udSupportKey, true);
} catch (error) {
window.log.error(
'Error: Unable to register for unauthenticated delivery support.',
error && error.stack ? error.stack : error
);
}
}
// const udSupportKey = 'hasRegisterSupportForUnauthenticatedDelivery';
// if (!storage.get(udSupportKey)) {
// const server = WebAPI.connect({ username: USERNAME, password: PASSWORD });
// try {
// await server.registerSupportForUnauthenticatedDelivery();
// storage.put(udSupportKey, true);
// } catch (error) {
// window.log.error(
// 'Error: Unable to register for unauthenticated delivery support.',
// error && error.stack ? error.stack : error
// );
// }
// }
const deviceId = textsecure.storage.user.getDeviceId();
const ourNumber = textsecure.storage.user.getNumber();

@ -32,7 +32,7 @@
ivAndCiphertext.set(new Uint8Array(ciphertext), iv.byteLength);
return {
type: 6, // friend request
type: textsecure.protobuf.Envelope.Type.FRIEND_REQUEST, // friend request
body: ivAndCiphertext,
registrationId: null,
};

@ -12,7 +12,7 @@ message Envelope {
PREKEY_BUNDLE = 3;
RECEIPT = 5;
UNIDENTIFIED_SENDER = 6;
FRIEND_REQUEST = 7; // contains prekeys + message and is using simple encryption
FRIEND_REQUEST = 101; // contains prekeys + message and is using simple encryption
}
optional Type type = 1;

Loading…
Cancel
Save