Remove source
from Envelope
This commit is contained in:
parent
3d94bf953c
commit
2b0d3cab40
3 changed files with 1 additions and 5 deletions
|
@ -23,7 +23,6 @@ message Envelope {
|
||||||
}
|
}
|
||||||
|
|
||||||
optional Type type = 1;
|
optional Type type = 1;
|
||||||
optional string source = 2;
|
|
||||||
optional string sourceUuid = 11;
|
optional string sourceUuid = 11;
|
||||||
optional uint32 sourceDevice = 7;
|
optional uint32 sourceDevice = 7;
|
||||||
optional string destinationUuid = 13;
|
optional string destinationUuid = 13;
|
||||||
|
|
|
@ -15,7 +15,6 @@ import { SignalService as Proto } from '../protobuf';
|
||||||
import * as Crypto from '../Crypto';
|
import * as Crypto from '../Crypto';
|
||||||
|
|
||||||
describe('MessageReceiver', () => {
|
describe('MessageReceiver', () => {
|
||||||
const number = '+19999999999';
|
|
||||||
const uuid = 'aaaaaaaa-bbbb-4ccc-9ddd-eeeeeeeeeeee';
|
const uuid = 'aaaaaaaa-bbbb-4ccc-9ddd-eeeeeeeeeeee';
|
||||||
const deviceId = 1;
|
const deviceId = 1;
|
||||||
|
|
||||||
|
@ -46,7 +45,6 @@ describe('MessageReceiver', () => {
|
||||||
|
|
||||||
const body = Proto.Envelope.encode({
|
const body = Proto.Envelope.encode({
|
||||||
type: Proto.Envelope.Type.CIPHERTEXT,
|
type: Proto.Envelope.Type.CIPHERTEXT,
|
||||||
source: number,
|
|
||||||
sourceUuid: uuid,
|
sourceUuid: uuid,
|
||||||
sourceDevice: deviceId,
|
sourceDevice: deviceId,
|
||||||
timestamp: Long.fromNumber(Date.now()),
|
timestamp: Long.fromNumber(Date.now()),
|
||||||
|
|
|
@ -357,7 +357,6 @@ export default class MessageReceiver
|
||||||
|
|
||||||
// Proto.Envelope fields
|
// Proto.Envelope fields
|
||||||
type: decoded.type,
|
type: decoded.type,
|
||||||
source: decoded.source,
|
|
||||||
sourceUuid: decoded.sourceUuid
|
sourceUuid: decoded.sourceUuid
|
||||||
? normalizeUuid(
|
? normalizeUuid(
|
||||||
decoded.sourceUuid,
|
decoded.sourceUuid,
|
||||||
|
@ -757,7 +756,7 @@ export default class MessageReceiver
|
||||||
|
|
||||||
// Proto.Envelope fields
|
// Proto.Envelope fields
|
||||||
type: decoded.type,
|
type: decoded.type,
|
||||||
source: decoded.source || item.source,
|
source: item.source,
|
||||||
sourceUuid: decoded.sourceUuid
|
sourceUuid: decoded.sourceUuid
|
||||||
? UUID.cast(decoded.sourceUuid)
|
? UUID.cast(decoded.sourceUuid)
|
||||||
: item.sourceUuid,
|
: item.sourceUuid,
|
||||||
|
|
Loading…
Reference in a new issue