Harden UUID-handling code paths
This commit is contained in:
parent
d3a27a6442
commit
bf04c9114e
10 changed files with 193 additions and 124 deletions
|
@ -17,12 +17,11 @@ function refreshOurProfile() {
|
|||
window.log.info('refreshOurProfile');
|
||||
const ourNumber = textsecure.storage.user.getNumber();
|
||||
const ourUuid = textsecure.storage.user.getUuid();
|
||||
const conversation = ConversationController.getOrCreate(
|
||||
// This is explicitly ourNumber first in order to avoid creating new
|
||||
// conversations when an old one exists
|
||||
ourNumber || ourUuid,
|
||||
'private'
|
||||
);
|
||||
const ourId = ConversationController.ensureContactIds({
|
||||
e164: ourNumber,
|
||||
uuid: ourUuid,
|
||||
});
|
||||
const conversation = ConversationController.get(ourId, 'private');
|
||||
conversation.updateUuid(ourUuid);
|
||||
conversation.updateE164(ourNumber);
|
||||
conversation.getProfiles();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue