Fix attachment crashes.

Fixes #13776
This commit is contained in:
Michelle Tang 2024-11-07 21:38:06 -05:00 committed by Greyson Parrelli
parent d11c117e71
commit 2c842ae385

View file

@ -19,6 +19,7 @@ import org.whispersystems.signalservice.internal.push.http.ResumableUploadSpec
import org.whispersystems.signalservice.internal.websocket.WebSocketRequestMessage
import java.io.InputStream
import java.security.SecureRandom
import kotlin.jvm.optionals.getOrNull
/**
* Class to interact with various attachment-related endpoints.
@ -108,7 +109,7 @@ class AttachmentApi(
incrementalDigestChunkSize = digestInfo.incrementalMacChunkSize,
uploadTimestamp = attachmentStream.uploadTimestamp,
dataSize = attachmentStream.length,
blurHash = attachmentStream.blurHash.get()
blurHash = attachmentStream.blurHash.getOrNull()
)
}
}