fix: auto download rule state

This commit is contained in:
rhunk 2023-08-23 01:36:32 +02:00
parent a49c4e9a45
commit 035d4ad971

View File

@ -231,7 +231,7 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp
val senderId = conversationMessage.senderId!! val senderId = conversationMessage.senderId!!
val conversationId = conversationMessage.clientConversationId!! val conversationId = conversationMessage.clientConversationId!!
if (!forceDownload && canUseRule(senderId)) { if (!forceDownload && !canUseRule(senderId)) {
return return
} }
@ -281,7 +281,7 @@ class MediaDownloader : MessagingRuleFeature("MediaDownloader", MessagingRuleTyp
) ?: throw Exception("Friend not found in database") ) ?: throw Exception("Friend not found in database")
val authorName = author.usernameForSorting!! val authorName = author.usernameForSorting!!
if (!forceDownload && canUseRule(author.userId!!)) return if (!forceDownload && !canUseRule(author.userId!!)) return
downloadOperaMedia(provideDownloadManagerClient( downloadOperaMedia(provideDownloadManagerClient(
pathSuffix = authorName, pathSuffix = authorName,