Send/Receive support for reaction read syncs

This commit is contained in:
Josh Perez
2021-05-06 18:15:25 -07:00
committed by GitHub
parent 82a9705010
commit e0c324e4ba
23 changed files with 1188 additions and 498 deletions

View File

@@ -0,0 +1,17 @@
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { ConversationAttributesType } from '../model-types.d';
export function isDirectConversation(
conversationAttrs: ConversationAttributesType
): boolean {
return conversationAttrs.type === 'private';
}
export function isMe(conversationAttrs: ConversationAttributesType): boolean {
const { e164, uuid } = conversationAttrs;
const ourNumber = window.textsecure.storage.user.getNumber();
const ourUuid = window.textsecure.storage.user.getUuid();
return Boolean((e164 && e164 === ourNumber) || (uuid && uuid === ourUuid));
}