Do not check errors if profileAvatar is null

This commit is contained in:
ThomasSession 2024-08-07 14:33:24 +10:00
parent 2b8d2d49e8
commit 2c4b8bf443

View File

@ -39,7 +39,7 @@ class RetrieveProfileAvatarJob(private val profileAvatar: String?, val recipient
override suspend fun execute(dispatcherName: String) { override suspend fun execute(dispatcherName: String) {
val delegate = delegate ?: return Log.w(TAG, "RetrieveProfileAvatarJob has no delegate method to work with!") val delegate = delegate ?: return Log.w(TAG, "RetrieveProfileAvatarJob has no delegate method to work with!")
if (profileAvatar in errorUrls) return delegate.handleJobFailed(this, dispatcherName, Exception("Profile URL 404'd this app instance")) if (profileAvatar != null && profileAvatar in errorUrls) return delegate.handleJobFailed(this, dispatcherName, Exception("Profile URL 404'd this app instance"))
val context = MessagingModuleConfiguration.shared.context val context = MessagingModuleConfiguration.shared.context
val storage = MessagingModuleConfiguration.shared.storage val storage = MessagingModuleConfiguration.shared.storage
val recipient = Recipient.from(context, recipientAddress, true) val recipient = Recipient.from(context, recipientAddress, true)