refactor: fix the closed group message sending and remove sig_timestamp

This commit is contained in:
0x330a
2023-10-05 17:14:32 +11:00
parent 0f7b17b384
commit c013a276f1
10 changed files with 212 additions and 131 deletions

View File

@@ -42,25 +42,17 @@ add_library( # Sets the name of the library.
# Provides a relative path to your source file(s).
${SOURCES})
if (LINUX)
message("Linux machine detected")
set(JAVA_INCLUDE_PATH "$ENV{JAVA_HOME}/include;$ENV{JAVA_HOME}/include/linux")
find_package(JNI REQUIRED)
include_directories(${JAVA_INCLUDE_PATH})
endif()
# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.
#find_library( # Sets the name of the path variable.
# log-lib
#
# # Specifies the name of the NDK library that
# # you want CMake to locate.
# log)
find_library( # Sets the name of the path variable.
log-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
log)
# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
@@ -73,5 +65,4 @@ target_link_libraries( # Specifies the target library.
libsession::crypto
# Links the target library to the log library
# included in the NDK.
)
#${log-lib})
${log-lib})

View File

@@ -1,6 +1,7 @@
#include "util.h"
//#include <sodium/crypto_sign.h>
#include "../../../libsession-util/external/libsodium-internal/src/libsodium/include/sodium/crypto_sign.h"
#include <string>
#include <sodium/crypto_sign.h>
namespace util {
@@ -334,6 +335,12 @@ Java_org_session_libsignal_utilities_Namespace_ENCRYPTION_1KEYS(JNIEnv *env, job
return (int) session::config::Namespace::GroupKeys;
}
extern "C"
JNIEXPORT jint JNICALL
Java_org_session_libsignal_utilities_Namespace_CLOSED_1GROUP_1MESSAGES(JNIEnv *env, jobject thiz) {
return (int) session::config::Namespace::GroupMessages;
}
extern "C"
JNIEXPORT void JNICALL
Java_network_loki_messenger_libsession_1util_Config_free(JNIEnv *env, jobject thiz) {