feat: start adding tests and fix dependencies for tests

This commit is contained in:
0x330a
2023-10-02 17:39:16 +11:00
parent 5bd6986055
commit fb2a7a8fed
10 changed files with 105 additions and 22 deletions

View File

@@ -100,7 +100,8 @@ class AttachmentDownloadJob(val attachmentID: Long, val databaseMessageID: Long)
handleFailure(Error.NoSender, null)
return
}
if (!threadRecipient.isGroupRecipient && (contact?.isTrusted == true || storage.getUserPublicKey() != sender)) {
if (!storage.shouldAutoDownloadAttachments(threadRecipient)) {
// if we aren't receiving a group message, a message from ourselves (self-send) and the contact sending is not trusted:
// do not continue, but do not fail
return