Refactor SnodeApi

This commit is contained in:
bemusementpark 2024-08-03 02:46:42 +09:30
parent b93ec3be04
commit 482f169df1
3 changed files with 268 additions and 463 deletions

View File

@ -63,7 +63,6 @@ data class ConfigurationSyncJob(val destination: Destination): Job {
// return a list of batch request objects
val snodeMessage = MessageSender.buildConfigMessageToSnode(destination.destinationPublicKey(), message)
val authenticated = SnodeAPI.buildAuthenticatedStoreBatchInfo(
destination.destinationPublicKey(),
config.configNamespace(),
snodeMessage
) ?: return@map null // this entry will be null otherwise

View File

@ -1,5 +1,7 @@
package org.session.libsignal.utilities;
import androidx.annotation.NonNull;
/**
* <p>Encodes and decodes to and from Base64 notation.</p>
* <p>Homepage: <a href="http://iharder.net/base64">http://iharder.net/base64</a>.</p>
@ -714,7 +716,7 @@ public class Base64
* @throws NullPointerException if source array is null
* @since 1.4
*/
public static String encodeBytes( byte[] source ) {
public static String encodeBytes(@NonNull byte[] source ) {
// Since we're not going to have the GZIP encoding turned on,
// we're not going to have an java.io.IOException thrown, so
// we should not force the user to have to catch it.