Don't set or read reaction target phone number
This commit is contained in:
parent
1a9c6b9385
commit
63ece2e9b4
5 changed files with 2 additions and 13 deletions
|
@ -1,4 +1,4 @@
|
||||||
// Copyright 2020 Signal Messenger, LLC
|
// Copyright 2020-2021 Signal Messenger, LLC
|
||||||
// SPDX-License-Identifier: AGPL-3.0-only
|
// SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
/* global
|
/* global
|
||||||
|
@ -31,7 +31,6 @@
|
||||||
const sentAt = message.get('sent_at');
|
const sentAt = message.get('sent_at');
|
||||||
const reactionsBySource = this.filter(re => {
|
const reactionsBySource = this.filter(re => {
|
||||||
const targetSenderId = ConversationController.ensureContactIds({
|
const targetSenderId = ConversationController.ensureContactIds({
|
||||||
e164: re.get('targetAuthorE164'),
|
|
||||||
uuid: re.get('targetAuthorUuid'),
|
uuid: re.get('targetAuthorUuid'),
|
||||||
});
|
});
|
||||||
const targetTimestamp = re.get('targetTimestamp');
|
const targetTimestamp = re.get('targetTimestamp');
|
||||||
|
@ -52,7 +51,6 @@
|
||||||
// to to figure that out.
|
// to to figure that out.
|
||||||
const targetConversation = await ConversationController.getConversationForTargetMessage(
|
const targetConversation = await ConversationController.getConversationForTargetMessage(
|
||||||
ConversationController.ensureContactIds({
|
ConversationController.ensureContactIds({
|
||||||
e164: reaction.get('targetAuthorE164'),
|
|
||||||
uuid: reaction.get('targetAuthorUuid'),
|
uuid: reaction.get('targetAuthorUuid'),
|
||||||
}),
|
}),
|
||||||
reaction.get('targetTimestamp')
|
reaction.get('targetTimestamp')
|
||||||
|
@ -60,7 +58,6 @@
|
||||||
if (!targetConversation) {
|
if (!targetConversation) {
|
||||||
window.log.info(
|
window.log.info(
|
||||||
'No target conversation for reaction',
|
'No target conversation for reaction',
|
||||||
reaction.get('targetAuthorE164'),
|
|
||||||
reaction.get('targetAuthorUuid'),
|
reaction.get('targetAuthorUuid'),
|
||||||
reaction.get('targetTimestamp')
|
reaction.get('targetTimestamp')
|
||||||
);
|
);
|
||||||
|
@ -91,7 +88,6 @@
|
||||||
|
|
||||||
const mcid = contact.get('id');
|
const mcid = contact.get('id');
|
||||||
const recid = ConversationController.ensureContactIds({
|
const recid = ConversationController.ensureContactIds({
|
||||||
e164: reaction.get('targetAuthorE164'),
|
|
||||||
uuid: reaction.get('targetAuthorUuid'),
|
uuid: reaction.get('targetAuthorUuid'),
|
||||||
});
|
});
|
||||||
return mcid === recid;
|
return mcid === recid;
|
||||||
|
@ -100,7 +96,6 @@
|
||||||
if (!targetMessage) {
|
if (!targetMessage) {
|
||||||
window.log.info(
|
window.log.info(
|
||||||
'No message for reaction',
|
'No message for reaction',
|
||||||
reaction.get('targetAuthorE164'),
|
|
||||||
reaction.get('targetAuthorUuid'),
|
reaction.get('targetAuthorUuid'),
|
||||||
reaction.get('targetTimestamp')
|
reaction.get('targetTimestamp')
|
||||||
);
|
);
|
||||||
|
@ -110,7 +105,6 @@
|
||||||
if (reaction.get('remove')) {
|
if (reaction.get('remove')) {
|
||||||
this.remove(reaction);
|
this.remove(reaction);
|
||||||
const oldReaction = this.where({
|
const oldReaction = this.where({
|
||||||
targetAuthorE164: reaction.get('targetAuthorE164'),
|
|
||||||
targetAuthorUuid: reaction.get('targetAuthorUuid'),
|
targetAuthorUuid: reaction.get('targetAuthorUuid'),
|
||||||
targetTimestamp: reaction.get('targetTimestamp'),
|
targetTimestamp: reaction.get('targetTimestamp'),
|
||||||
emoji: reaction.get('emoji'),
|
emoji: reaction.get('emoji'),
|
||||||
|
|
|
@ -209,7 +209,7 @@ message DataMessage {
|
||||||
message Reaction {
|
message Reaction {
|
||||||
optional string emoji = 1;
|
optional string emoji = 1;
|
||||||
optional bool remove = 2;
|
optional bool remove = 2;
|
||||||
optional string targetAuthorE164 = 3;
|
reserved /* targetAuthorE164 */ 3; // removed
|
||||||
optional string targetAuthorUuid = 4;
|
optional string targetAuthorUuid = 4;
|
||||||
optional uint64 targetTimestamp = 5;
|
optional uint64 targetTimestamp = 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2601,7 +2601,6 @@ export async function startApp(): Promise<void> {
|
||||||
const reactionModel = window.Whisper.Reactions.add({
|
const reactionModel = window.Whisper.Reactions.add({
|
||||||
emoji: reaction.emoji,
|
emoji: reaction.emoji,
|
||||||
remove: reaction.remove,
|
remove: reaction.remove,
|
||||||
targetAuthorE164: reaction.targetAuthorE164,
|
|
||||||
targetAuthorUuid: reaction.targetAuthorUuid,
|
targetAuthorUuid: reaction.targetAuthorUuid,
|
||||||
targetTimestamp: reaction.targetTimestamp,
|
targetTimestamp: reaction.targetTimestamp,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
@ -2892,7 +2891,6 @@ export async function startApp(): Promise<void> {
|
||||||
const reactionModel = window.Whisper.Reactions.add({
|
const reactionModel = window.Whisper.Reactions.add({
|
||||||
emoji: reaction.emoji,
|
emoji: reaction.emoji,
|
||||||
remove: reaction.remove,
|
remove: reaction.remove,
|
||||||
targetAuthorE164: reaction.targetAuthorE164,
|
|
||||||
targetAuthorUuid: reaction.targetAuthorUuid,
|
targetAuthorUuid: reaction.targetAuthorUuid,
|
||||||
targetTimestamp: reaction.targetTimestamp,
|
targetTimestamp: reaction.targetTimestamp,
|
||||||
timestamp: Date.now(),
|
timestamp: Date.now(),
|
||||||
|
|
1
ts/textsecure.d.ts
vendored
1
ts/textsecure.d.ts
vendored
|
@ -736,7 +736,6 @@ export declare namespace DataMessageClass {
|
||||||
class Reaction {
|
class Reaction {
|
||||||
emoji: string | null;
|
emoji: string | null;
|
||||||
remove: boolean;
|
remove: boolean;
|
||||||
targetAuthorE164: string | null;
|
|
||||||
targetAuthorUuid: string | null;
|
targetAuthorUuid: string | null;
|
||||||
targetTimestamp: ProtoBigNumberType | null;
|
targetTimestamp: ProtoBigNumberType | null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -172,7 +172,6 @@ class Message {
|
||||||
reaction?: {
|
reaction?: {
|
||||||
emoji?: string;
|
emoji?: string;
|
||||||
remove?: boolean;
|
remove?: boolean;
|
||||||
targetAuthorE164?: string;
|
|
||||||
targetAuthorUuid?: string;
|
targetAuthorUuid?: string;
|
||||||
targetTimestamp?: number;
|
targetTimestamp?: number;
|
||||||
};
|
};
|
||||||
|
@ -315,7 +314,6 @@ class Message {
|
||||||
proto.reaction = new window.textsecure.protobuf.DataMessage.Reaction();
|
proto.reaction = new window.textsecure.protobuf.DataMessage.Reaction();
|
||||||
proto.reaction.emoji = this.reaction.emoji || null;
|
proto.reaction.emoji = this.reaction.emoji || null;
|
||||||
proto.reaction.remove = this.reaction.remove || false;
|
proto.reaction.remove = this.reaction.remove || false;
|
||||||
proto.reaction.targetAuthorE164 = this.reaction.targetAuthorE164 || null;
|
|
||||||
proto.reaction.targetAuthorUuid = this.reaction.targetAuthorUuid || null;
|
proto.reaction.targetAuthorUuid = this.reaction.targetAuthorUuid || null;
|
||||||
proto.reaction.targetTimestamp = this.reaction.targetTimestamp || null;
|
proto.reaction.targetTimestamp = this.reaction.targetTimestamp || null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue