Clean up UUID-handling to prepare for future
This commit is contained in:
parent
5369950c1d
commit
3f58a9b762
7 changed files with 55 additions and 31 deletions
|
@ -1810,11 +1810,12 @@ type WhatIsThis = import('./window.d').WhatIsThis;
|
|||
!c.isEverUnregistered()
|
||||
)
|
||||
)
|
||||
.map(c => c.get('e164'));
|
||||
.map(c => c.get('e164'))
|
||||
.filter(Boolean) as Array<string>;
|
||||
|
||||
if (lonelyE164s.length > 0) {
|
||||
const lookup = await window.textsecure.messaging.getUuidsForE164s(
|
||||
lonelyE164s as WhatIsThis
|
||||
lonelyE164s
|
||||
);
|
||||
const e164s = Object.keys(lookup);
|
||||
e164s.forEach(e164 => {
|
||||
|
|
|
@ -2428,7 +2428,6 @@ export class ConversationModel extends window.Backbone.Model<
|
|||
: '';
|
||||
|
||||
return {
|
||||
author: contact.get('e164'),
|
||||
authorUuid: contact.get('uuid'),
|
||||
bodyRanges: quotedMessage.get('bodyRanges'),
|
||||
id: quotedMessage.get('sent_at'),
|
||||
|
@ -2594,7 +2593,6 @@ export class ConversationModel extends window.Backbone.Model<
|
|||
async sendReactionMessage(
|
||||
reaction: { emoji: string; remove: boolean },
|
||||
target: {
|
||||
targetAuthorE164: string;
|
||||
targetAuthorUuid: string;
|
||||
targetTimestamp: number;
|
||||
}
|
||||
|
|
|
@ -628,6 +628,7 @@ async function removeAllSignedPreKeys() {
|
|||
const ITEM_KEYS: { [key: string]: Array<string> | undefined } = {
|
||||
identityKey: ['value.pubKey', 'value.privKey'],
|
||||
senderCertificate: ['value.serialized'],
|
||||
senderCertificateNoE164: ['value.serialized'],
|
||||
signaling_key: ['value'],
|
||||
profileKey: ['value'],
|
||||
};
|
||||
|
|
|
@ -1083,13 +1083,18 @@ export function initialize({
|
|||
);
|
||||
}
|
||||
|
||||
async function getSenderCertificate() {
|
||||
async function getSenderCertificate(omitE164?: boolean) {
|
||||
const baseParameters = '?includeUuid=true';
|
||||
const urlParameters = `${baseParameters}${
|
||||
omitE164 ? '&includeE164=false' : ''
|
||||
}`;
|
||||
|
||||
return _ajax({
|
||||
call: 'deliveryCert',
|
||||
httpType: 'GET',
|
||||
responseType: 'json',
|
||||
validateResponse: { certificate: 'string' },
|
||||
urlParameters: '?includeUuid=true',
|
||||
urlParameters,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
@ -15173,7 +15173,7 @@
|
|||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/WebAPI.js",
|
||||
"line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(quote, 'binary', window.dcodeIO.ByteBuffer.LITTLE_ENDIAN);",
|
||||
"lineNumber": 1263,
|
||||
"lineNumber": 1265,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-09-08T23:07:22.682Z"
|
||||
},
|
||||
|
@ -15181,7 +15181,7 @@
|
|||
"rule": "jQuery-wrap(",
|
||||
"path": "ts/textsecure/WebAPI.ts",
|
||||
"line": " const byteBuffer = window.dcodeIO.ByteBuffer.wrap(",
|
||||
"lineNumber": 2172,
|
||||
"lineNumber": 2177,
|
||||
"reasonCategory": "falseMatch",
|
||||
"updated": "2020-09-08T23:07:22.682Z"
|
||||
}
|
||||
|
|
|
@ -2931,7 +2931,6 @@ Whisper.ConversationView = Whisper.View.extend({
|
|||
|
||||
try {
|
||||
await this.model.sendReactionMessage(reaction, {
|
||||
targetAuthorE164: messageModel.getSource(),
|
||||
targetAuthorUuid: messageModel.getSourceUuid(),
|
||||
targetTimestamp: messageModel.get('sent_at'),
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue