Merge pull request #838 from loki-project/friend-request-fix

Friend request bug fix
pull/841/head
Mikunj Varsani 5 years ago committed by GitHub
commit 366becca98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -614,7 +614,9 @@ class LokiAppDotNetServerAPI {
`serverRequest ${mode} error`, `serverRequest ${mode} error`,
e.code, e.code,
e.message, e.message,
`json: ${txtResponse}`, 'attempting connection to', url `json: ${txtResponse}`,
'attempting connection to',
url
); );
} else { } else {
log.info( log.info(

@ -484,6 +484,7 @@ OutgoingMessage.prototype = {
sourceDevice: 1, sourceDevice: 1,
content, content,
pubKey: devicePubKey, pubKey: devicePubKey,
isFriendRequest: enableFallBackEncryption,
}; };
}) })
) )
@ -504,10 +505,7 @@ OutgoingMessage.prototype = {
this.timestamp, this.timestamp,
outgoingObject.ttl outgoingObject.ttl
); );
if ( if (outgoingObject.isFriendRequest) {
outgoingObject.type ===
textsecure.protobuf.Envelope.Type.FRIEND_REQUEST
) {
const conversation = ConversationController.get(destination); const conversation = ConversationController.get(destination);
if (conversation) { if (conversation) {
// Redundant for primary device but marks secondary devices as pending // Redundant for primary device but marks secondary devices as pending

Loading…
Cancel
Save