mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-24 02:39:55 +01:00
Add Calling Requests.
This commit is contained in:
committed by
Greyson Parrelli
parent
5a12eedc2c
commit
1e250ee95c
@@ -184,13 +184,13 @@ public class RecipientUtil {
|
||||
|
||||
@WorkerThread
|
||||
private static boolean isMessageRequestAccepted(@NonNull Context context, long threadId, @NonNull Recipient threadRecipient) {
|
||||
return threadRecipient.isLocalNumber() ||
|
||||
threadRecipient.isProfileSharing() ||
|
||||
threadRecipient.isSystemContact() ||
|
||||
threadRecipient.isForceSmsSelection() ||
|
||||
!threadRecipient.isRegistered() ||
|
||||
hasSentMessageInThread(context, threadId) ||
|
||||
noSecureMessagesInThread(context, threadId) ||
|
||||
return threadRecipient.isLocalNumber() ||
|
||||
threadRecipient.isProfileSharing() ||
|
||||
threadRecipient.isSystemContact() ||
|
||||
threadRecipient.isForceSmsSelection() ||
|
||||
!threadRecipient.isRegistered() ||
|
||||
hasSentMessageInThread(context, threadId) ||
|
||||
noSecureMessagesAndNoCallsInThread(context, threadId) ||
|
||||
isPreMessageRequestThread(context, threadId);
|
||||
}
|
||||
|
||||
@@ -200,8 +200,9 @@ public class RecipientUtil {
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
private static boolean noSecureMessagesInThread(@NonNull Context context, long threadId) {
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getSecureConversationCount(threadId) == 0;
|
||||
private static boolean noSecureMessagesAndNoCallsInThread(@NonNull Context context, long threadId) {
|
||||
return DatabaseFactory.getMmsSmsDatabase(context).getSecureConversationCount(threadId) == 0 &&
|
||||
!DatabaseFactory.getThreadDatabase(context).hasReceivedAnyCallsSince(threadId, 0);
|
||||
}
|
||||
|
||||
@WorkerThread
|
||||
|
||||
Reference in New Issue
Block a user