Ensure we don't supply undefined to SyncMessage.Read protobuf
This commit is contained in:
parent
df45e6a95f
commit
58cb9fba6b
2 changed files with 4 additions and 4 deletions
4
ts/textsecure.d.ts
vendored
4
ts/textsecure.d.ts
vendored
|
@ -1196,8 +1196,8 @@ export declare namespace SyncMessageClass {
|
||||||
groupIds?: Array<ProtoBinaryType>;
|
groupIds?: Array<ProtoBinaryType>;
|
||||||
}
|
}
|
||||||
class Read {
|
class Read {
|
||||||
sender?: string;
|
sender: string | null;
|
||||||
senderUuid?: string;
|
senderUuid: string | null;
|
||||||
timestamp?: ProtoBigNumberType;
|
timestamp?: ProtoBigNumberType;
|
||||||
}
|
}
|
||||||
class Request {
|
class Request {
|
||||||
|
|
|
@ -1232,8 +1232,8 @@ export default class MessageSender {
|
||||||
for (let i = 0; i < reads.length; i += 1) {
|
for (let i = 0; i < reads.length; i += 1) {
|
||||||
const read = new window.textsecure.protobuf.SyncMessage.Read();
|
const read = new window.textsecure.protobuf.SyncMessage.Read();
|
||||||
read.timestamp = reads[i].timestamp;
|
read.timestamp = reads[i].timestamp;
|
||||||
read.sender = reads[i].senderE164;
|
read.sender = reads[i].senderE164 || null;
|
||||||
read.senderUuid = reads[i].senderUuid;
|
read.senderUuid = reads[i].senderUuid || null;
|
||||||
|
|
||||||
syncMessage.read.push(read);
|
syncMessage.read.push(read);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue