Use same dummy hash as ios and desktop in getExpiries()

This commit is contained in:
Andrew 2023-12-18 13:36:44 +10:30
parent f921fc4933
commit 7fd036dee9

View File

@ -533,7 +533,7 @@ object SnodeAPI {
fun getExpiries(messageHashes: List<String>, publicKey: String) : RawResponsePromise { fun getExpiries(messageHashes: List<String>, publicKey: String) : RawResponsePromise {
val userEd25519KeyPair = MessagingModuleConfiguration.shared.getUserED25519KeyPair() ?: return Promise.ofFail(NullPointerException("No user key pair")) val userEd25519KeyPair = MessagingModuleConfiguration.shared.getUserED25519KeyPair() ?: return Promise.ofFail(NullPointerException("No user key pair"))
val hashes = messageHashes.takeIf { it.size != 1 } ?: (messageHashes + "") // TODO remove this when bug is fixed on nodes. val hashes = messageHashes.takeIf { it.size != 1 } ?: (messageHashes + "///////////////////////////////////////////") // TODO remove this when bug is fixed on nodes.
return retryIfNeeded(maxRetryCount) { return retryIfNeeded(maxRetryCount) {
val timestamp = System.currentTimeMillis() + clockOffset val timestamp = System.currentTimeMillis() + clockOffset
val signData = "${Snode.Method.GetExpiries.rawValue}$timestamp${hashes.joinToString(separator = "")}".toByteArray() val signData = "${Snode.Method.GetExpiries.rawValue}$timestamp${hashes.joinToString(separator = "")}".toByteArray()