mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-24 10:28:03 +01:00
Send/Receive support for reaction read syncs
This commit is contained in:
17
ts/util/whatTypeOfConversation.ts
Normal file
17
ts/util/whatTypeOfConversation.ts
Normal 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));
|
||||
}
|
||||
Reference in New Issue
Block a user