Fixes isAccepted logic when calling it for the first time
This commit is contained in:
@@ -11,7 +11,8 @@ import { isInSystemContacts } from './isInSystemContacts';
|
||||
* of message requests
|
||||
*/
|
||||
export function isConversationAccepted(
|
||||
conversationAttrs: ConversationAttributesType
|
||||
conversationAttrs: ConversationAttributesType,
|
||||
{ ignoreEmptyConvo = false } = {}
|
||||
): boolean {
|
||||
const messageRequestsEnabled = window.Signal.RemoteConfig.isEnabled(
|
||||
'desktop.messageRequests'
|
||||
@@ -40,7 +41,9 @@ export function isConversationAccepted(
|
||||
const hasNoMessages = (conversationAttrs.messageCount || 0) === 0;
|
||||
|
||||
const isEmptyPrivateConvo =
|
||||
hasNoMessages && isDirectConversation(conversationAttrs);
|
||||
hasNoMessages &&
|
||||
isDirectConversation(conversationAttrs) &&
|
||||
!ignoreEmptyConvo;
|
||||
const isEmptyWhitelistedGroup =
|
||||
hasNoMessages &&
|
||||
!isDirectConversation(conversationAttrs) &&
|
||||
|
Reference in New Issue
Block a user