Remove source from Envelope

This commit is contained in:
Fedor Indutny 2022-08-02 09:19:21 -07:00 committed by GitHub
parent 3d94bf953c
commit 2b0d3cab40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 5 deletions

View file

@ -23,7 +23,6 @@ message Envelope {
}
optional Type type = 1;
optional string source = 2;
optional string sourceUuid = 11;
optional uint32 sourceDevice = 7;
optional string destinationUuid = 13;

View file

@ -15,7 +15,6 @@ import { SignalService as Proto } from '../protobuf';
import * as Crypto from '../Crypto';
describe('MessageReceiver', () => {
const number = '+19999999999';
const uuid = 'aaaaaaaa-bbbb-4ccc-9ddd-eeeeeeeeeeee';
const deviceId = 1;
@ -46,7 +45,6 @@ describe('MessageReceiver', () => {
const body = Proto.Envelope.encode({
type: Proto.Envelope.Type.CIPHERTEXT,
source: number,
sourceUuid: uuid,
sourceDevice: deviceId,
timestamp: Long.fromNumber(Date.now()),

View file

@ -357,7 +357,6 @@ export default class MessageReceiver
// Proto.Envelope fields
type: decoded.type,
source: decoded.source,
sourceUuid: decoded.sourceUuid
? normalizeUuid(
decoded.sourceUuid,
@ -757,7 +756,7 @@ export default class MessageReceiver
// Proto.Envelope fields
type: decoded.type,
source: decoded.source || item.source,
source: item.source,
sourceUuid: decoded.sourceUuid
? UUID.cast(decoded.sourceUuid)
: item.sourceUuid,