refactor: change request to use default pubkey

This commit is contained in:
jubb 2021-05-06 13:48:35 +10:00
parent 704723ed80
commit a4b7b34f2e

View File

@ -75,9 +75,7 @@ object FileServerAPIV2 {
} }
if (request.useOnionRouting) { if (request.useOnionRouting) {
val publicKey = MessagingModuleConfiguration.shared.storage.getOpenGroupPublicKey(DEFAULT_SERVER) return OnionRequestAPI.sendOnionRequest(requestBuilder.build(), DEFAULT_SERVER, DEFAULT_SERVER_PUBLIC_KEY)
?: return Promise.ofFail(OpenGroupAPIV2.Error.NO_PUBLIC_KEY)
return OnionRequestAPI.sendOnionRequest(requestBuilder.build(), DEFAULT_SERVER, publicKey)
.fail { e -> .fail { e ->
Log.e("Loki", "FileServerV2 failed with error",e) Log.e("Loki", "FileServerV2 failed with error",e)
} }