mirror of
https://github.com/oxen-io/session-android.git
synced 2023-12-14 02:53:01 +01:00
fix: don't do double protobuf
This commit is contained in:
parent
00ad9cf39f
commit
709f0629a0
|
@ -115,20 +115,31 @@ data class ConfigurationSyncJob(val destination: Destination) : Job {
|
||||||
seqNo
|
seqNo
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
} else {
|
} else if (destination is Destination.Contact) {
|
||||||
// assume our own user as check already takes place in `execute` for our own key
|
// assume our own user as check already takes place in `execute` for our own key
|
||||||
// if contact
|
// if contact
|
||||||
|
val sentTimestamp = SnodeAPI.nowWithOffset
|
||||||
configFactoryProtocol.getUserConfigs().filter { it.needsPush() }.map { config ->
|
configFactoryProtocol.getUserConfigs().filter { it.needsPush() }.map { config ->
|
||||||
val (bytes, seqNo, obsoleteHashes) = config.push()
|
val (push, seqNo, obsoleteHashes) = config.push()
|
||||||
toDelete += obsoleteHashes
|
toDelete += obsoleteHashes
|
||||||
val message =
|
val message =
|
||||||
messageForConfig(config, bytes, seqNo)
|
SnodeMessage(
|
||||||
?: throw NullPointerException(
|
destination.publicKey,
|
||||||
"SnodeBatchRequest message was null, check group keys exists"
|
Base64.encodeBytes(push),
|
||||||
|
SnodeMessage.CONFIG_TTL,
|
||||||
|
sentTimestamp
|
||||||
|
)
|
||||||
|
|
||||||
|
ConfigMessageInformation(
|
||||||
|
SnodeAPI.buildAuthenticatedStoreBatchInfo(
|
||||||
|
config.namespace(),
|
||||||
|
message
|
||||||
|
)!!,
|
||||||
|
config,
|
||||||
|
seqNo
|
||||||
)
|
)
|
||||||
ConfigMessageInformation(message, config, seqNo)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
} else throw InvalidDestination()
|
||||||
return SyncInformation(configsRequiringPush, toDelete)
|
return SyncInformation(configsRequiringPush, toDelete)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue