mirror of
https://github.com/oxen-io/session-android.git
synced 2025-08-11 12:37:26 +00:00
Put back invite contacts job
This commit is contained in:
@@ -277,14 +277,15 @@ extern "C"
|
||||
JNIEXPORT jbyteArray JNICALL
|
||||
Java_network_loki_messenger_libsession_1util_GroupKeysConfig_supplementFor(JNIEnv *env,
|
||||
jobject thiz,
|
||||
jstring user_session_id) {
|
||||
jobjectArray j_user_session_ids) {
|
||||
std::lock_guard lock{util::util_mutex_};
|
||||
auto ptr = ptrToKeys(env, thiz);
|
||||
auto string = env->GetStringUTFChars(user_session_id, nullptr);
|
||||
auto supplement = ptr->key_supplement(string);
|
||||
auto supplement_jbytearray = util::bytes_from_ustring(env, supplement);
|
||||
env->ReleaseStringUTFChars(user_session_id, string);
|
||||
return supplement_jbytearray;
|
||||
std::vector<std::string> user_session_ids;
|
||||
for (int i = 0, size = env->GetArrayLength(j_user_session_ids); i < size; i++) {
|
||||
user_session_ids.push_back(util::string_from_jstring(env, (jstring)(env->GetObjectArrayElement(j_user_session_ids, i))));
|
||||
}
|
||||
auto supplement = ptr->key_supplement(user_session_ids);
|
||||
return util::bytes_from_ustring(env, supplement);
|
||||
}
|
||||
extern "C"
|
||||
JNIEXPORT jint JNICALL
|
||||
|
@@ -427,7 +427,7 @@ interface ReadableGroupKeysConfig {
|
||||
fun dump(): ByteArray
|
||||
fun needsRekey(): Boolean
|
||||
fun pendingKey(): ByteArray?
|
||||
fun supplementFor(userSessionId: String): ByteArray
|
||||
fun supplementFor(userSessionIds: List<String>): ByteArray
|
||||
fun pendingConfig(): ByteArray?
|
||||
fun currentHashes(): List<String>
|
||||
fun encrypt(plaintext: ByteArray): ByteArray
|
||||
@@ -484,7 +484,11 @@ class GroupKeysConfig private constructor(pointer: Long): ConfigSig(pointer), Mu
|
||||
membersPtr: Long): Boolean
|
||||
external override fun needsRekey(): Boolean
|
||||
external override fun pendingKey(): ByteArray?
|
||||
external override fun supplementFor(userSessionId: String): ByteArray
|
||||
private external fun supplementFor(userSessionIds: Array<String>): ByteArray
|
||||
override fun supplementFor(userSessionIds: List<String>): ByteArray {
|
||||
return supplementFor(userSessionIds.toTypedArray())
|
||||
}
|
||||
|
||||
external override fun pendingConfig(): ByteArray?
|
||||
external override fun currentHashes(): List<String>
|
||||
external fun rekey(infoPtr: Long, membersPtr: Long): ByteArray
|
||||
|
Reference in New Issue
Block a user