More useful comment

This commit is contained in:
Benoit Marty 2021-07-21 14:40:07 +02:00
parent 4ead39038c
commit 08ea3c0888
3 changed files with 9 additions and 3 deletions

View File

@ -70,7 +70,9 @@ internal class CancelGossipRequestWorker(context: Context,
}
override suspend fun doSafeWork(params: Params): Result {
// (temporary code)
// params.txnId should be provided in all cases now. But Params can be deserialized by
// the WorkManager from data serialized in a previous version of the application, so without the txnId field.
// So if not present, we create a txnId
val txnId = params.txnId ?: createUniqueTxnId()
val contentMap = MXUsersDevicesMap<Any>()
val toDeviceContent = ShareRequestCancellation(

View File

@ -61,7 +61,9 @@ internal class SendGossipRequestWorker(context: Context,
}
override suspend fun doSafeWork(params: Params): Result {
// (temporary code)
// params.txnId should be provided in all cases now. But Params can be deserialized by
// the WorkManager from data serialized in a previous version of the application, so without the txnId field.
// So if not present, we create a txnId
val txnId = params.txnId ?: createUniqueTxnId()
val contentMap = MXUsersDevicesMap<Any>()
val eventType: String

View File

@ -65,7 +65,9 @@ internal class SendGossipWorker(context: Context,
}
override suspend fun doSafeWork(params: Params): Result {
// (temporary code)
// params.txnId should be provided in all cases now. But Params can be deserialized by
// the WorkManager from data serialized in a previous version of the application, so without the txnId field.
// So if not present, we create a txnId
val txnId = params.txnId ?: createUniqueTxnId()
val eventType: String = EventType.SEND_SECRET