Fix signal connection count
This commit is contained in:
parent
4dfbb25c71
commit
f1665c65d0
2 changed files with 9 additions and 1 deletions
|
@ -5,8 +5,10 @@ import type { ConversationAttributesType } from '../model-types.d';
|
|||
import type { ConversationModel } from '../models/conversations';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { isInSystemContacts } from './isInSystemContacts';
|
||||
import { isSignalConversation } from './isSignalConversation';
|
||||
import { isDirectConversation } from './whatTypeOfConversation';
|
||||
import { isConversationEverUnregistered } from './isConversationUnregistered';
|
||||
import { isBlocked } from './isBlocked';
|
||||
|
||||
export function isSignalConnection(
|
||||
conversation: ConversationType | ConversationAttributesType
|
||||
|
@ -15,6 +17,10 @@ export function isSignalConnection(
|
|||
isDirectConversation(conversation) &&
|
||||
(conversation.profileSharing || isInSystemContacts(conversation)) &&
|
||||
conversation.serviceId !== undefined &&
|
||||
('isBlocked' in conversation
|
||||
? !conversation.isBlocked
|
||||
: !isBlocked(conversation)) &&
|
||||
!isSignalConversation(conversation) &&
|
||||
!isConversationEverUnregistered(conversation)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue