Skip to content

Commit

Permalink
Allow auto-download for users you've shared your profile with.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal authored and alex-signal committed May 14, 2020
1 parent 86f0456 commit 40b5339
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,10 @@ private static boolean isFromUnknownContact(@NonNull Context context, @NonNull D
try (Cursor messageCursor = DatabaseFactory.getMmsDatabase(context).getMessage(attachment.getMmsId())) {
final MessageRecord message = DatabaseFactory.getMmsDatabase(context).readerFor(messageCursor).getNext();

if (message == null || (!message.getRecipient().isSystemContact() && !message.isOutgoing() && !message.getRecipient().isLocalNumber())) {
if (message == null || (!message.getRecipient().isSystemContact() &&
!message.getRecipient().isProfileSharing() &&
!message.isOutgoing() &&
!message.getRecipient().isLocalNumber())) {
return true;
}
}
Expand Down

0 comments on commit 40b5339

Please sign in to comment.