mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-11-26 11:26:01 +03:00
Code review
This commit is contained in:
parent
ab6e0767bb
commit
4ead39038c
2 changed files with 4 additions and 2 deletions
|
@ -46,7 +46,9 @@ internal class DefaultSendToDeviceTask @Inject constructor(
|
|||
messages = params.contentMap.map
|
||||
)
|
||||
|
||||
// Create a unique txnId first, to use the same value if the request is retried
|
||||
// If params.transactionId is not provided, we create a unique txnId.
|
||||
// It's important to do that outside the requestBlock parameter of executeRequest()
|
||||
// to use the same value if the request is retried
|
||||
val txnId = params.transactionId ?: createUniqueTxnId()
|
||||
|
||||
return executeRequest(
|
||||
|
|
|
@ -19,5 +19,5 @@ package org.matrix.android.sdk.internal.crypto.util
|
|||
import java.util.UUID
|
||||
|
||||
internal object RequestIdHelper {
|
||||
fun createUniqueRequestId() = "req_" + UUID.randomUUID().toString()
|
||||
fun createUniqueRequestId() = UUID.randomUUID().toString()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue