Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Signal-Android
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
GitHub Mirror
Signal
Signal-Android
Commits
fb919466
Commit
fb919466
authored
3 years ago
by
Greyson Parrelli
Browse files
Options
Downloads
Patches
Plain Diff
Enqueue a profile fetch to resolve identity key conflicts.
parent
4a4cf08c
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
app/src/main/java/org/thoughtcrime/securesms/storage/ContactRecordProcessor.java
+6
-0
6 additions, 0 deletions
...houghtcrime/securesms/storage/ContactRecordProcessor.java
with
6 additions
and
0 deletions
app/src/main/java/org/thoughtcrime/securesms/storage/ContactRecordProcessor.java
+
6
−
0
View file @
fb919466
...
@@ -9,6 +9,7 @@ import org.signal.core.util.logging.Log;
...
@@ -9,6 +9,7 @@ import org.signal.core.util.logging.Log;
import
org.thoughtcrime.securesms.database.RecipientDatabase
;
import
org.thoughtcrime.securesms.database.RecipientDatabase
;
import
org.thoughtcrime.securesms.database.SignalDatabase
;
import
org.thoughtcrime.securesms.database.SignalDatabase
;
import
org.thoughtcrime.securesms.database.model.RecipientRecord
;
import
org.thoughtcrime.securesms.database.model.RecipientRecord
;
import
org.thoughtcrime.securesms.jobs.RetrieveProfileJob
;
import
org.thoughtcrime.securesms.recipients.Recipient
;
import
org.thoughtcrime.securesms.recipients.Recipient
;
import
org.thoughtcrime.securesms.recipients.RecipientId
;
import
org.thoughtcrime.securesms.recipients.RecipientId
;
import
org.whispersystems.signalservice.api.push.ServiceId
;
import
org.whispersystems.signalservice.api.push.ServiceId
;
...
@@ -112,6 +113,11 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
...
@@ -112,6 +113,11 @@ public class ContactRecordProcessor extends DefaultStorageRecordProcessor<Signal
identityKey
=
local
.
getIdentityKey
().
orElse
(
null
);
identityKey
=
local
.
getIdentityKey
().
orElse
(
null
);
}
}
if
(
identityKey
!=
null
&&
remote
.
getIdentityKey
().
isPresent
()
&&
!
Arrays
.
equals
(
identityKey
,
remote
.
getIdentityKey
().
get
()))
{
Log
.
w
(
TAG
,
"The local and remote identity keys do not match for "
+
local
.
getAddress
().
getIdentifier
()
+
". Enqueueing a profile fetch."
);
RetrieveProfileJob
.
enqueue
(
Recipient
.
externalPush
(
local
.
getAddress
()).
getId
());
}
byte
[]
unknownFields
=
remote
.
serializeUnknownFields
();
byte
[]
unknownFields
=
remote
.
serializeUnknownFields
();
ServiceId
serviceId
=
local
.
getAddress
().
getServiceId
()
==
ServiceId
.
UNKNOWN
?
remote
.
getAddress
().
getServiceId
()
:
local
.
getAddress
().
getServiceId
();
ServiceId
serviceId
=
local
.
getAddress
().
getServiceId
()
==
ServiceId
.
UNKNOWN
?
remote
.
getAddress
().
getServiceId
()
:
local
.
getAddress
().
getServiceId
();
String
e164
=
OptionalUtil
.
or
(
remote
.
getAddress
().
getNumber
(),
local
.
getAddress
().
getNumber
()).
orElse
(
null
);
String
e164
=
OptionalUtil
.
or
(
remote
.
getAddress
().
getNumber
(),
local
.
getAddress
().
getNumber
()).
orElse
(
null
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment