Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2022, macos-13, ubuntu-20.04]
os: [windows-2022, macos-13, ubuntu-22.04]
env:
SIGNAL_ENV: production
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -44,12 +44,12 @@ jobs:
uses: microsoft/setup-msbuild@v1.3.1
if: runner.os == 'Windows'

# - name: sed it
# if: runner.os == 'Windows'
# shell: bash
# run: |
# sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
# cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
- name: sed it
if: runner.os == 'Windows'
shell: bash
run: |
sed -i "s/target_compile_options(oxen-logging-warnings INTERFACE/#target_compile_options(oxen-logging-warnings INTERFACE/" libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt
cat libsession-util/external/oxen-libquic/external/oxen-logging/CMakeLists.txt

- name: build libsession-util-nodejs
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libsession-util"]
path = libsession-util
url = https://github.com/session-foundation/libsession-util.git
url = https://github.com/mpretty-cyro/libsession-util.git
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ else()
endif()
message(STATUS "Number of processors detected: ${N}")


add_definitions(-DNAPI_VERSION=8)
set(CMAKE_CONFIGURATION_TYPES Release)

Expand All @@ -31,6 +30,10 @@ SET(WITH_TESTS OFF)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(ENABLE_ONIONREQ OFF)
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(OXENC_EXTRA_WARNINGS OFF)
endif()

# when building from a release of libsession on desktop, it complains that ios-cmake is not up to date
# as it is not part of the archive. We actually don't care about it on session-desktop
Expand Down
2 changes: 1 addition & 1 deletion libsession-util
Submodule libsession-util updated 90 files
+1 −1 .clang-format
+3 −1 .drone.jsonnet
+1 −1 .gitignore
+3 −3 .gitmodules
+18 −4 CMakeLists.txt
+25 −3 cmake/AddStaticBundleLib.cmake
+4 −1 cmake/GenVersion.cmake
+0 −41 cmake/StaticBuild.cmake
+31 −10 external/CMakeLists.txt
+0 −1 external/oxen-encoding
+1 −0 external/oxen-libquic
+6 −9 include/session/config.hpp
+49 −45 include/session/config/base.h
+54 −30 include/session/config/base.hpp
+2 −2 include/session/config/contacts.h
+16 −4 include/session/config/convo_info_volatile.h
+0 −1 include/session/config/groups/info.h
+1 −1 include/session/config/groups/info.hpp
+7 −8 include/session/config/groups/keys.hpp
+4 −1 include/session/config/groups/members.h
+1 −2 include/session/config/profile_pic.hpp
+2 −1 include/session/config/protos.hpp
+12 −3 include/session/config/user_groups.h
+1 −1 include/session/config/user_groups.hpp
+1 −1 include/session/curve25519.hpp
+28 −0 include/session/file.hpp
+20 −0 include/session/log_level.h
+73 −0 include/session/logging.h
+112 −0 include/session/logging.hpp
+351 −0 include/session/network.h
+754 −0 include/session/network.hpp
+26 −39 include/session/onionreq/builder.h
+59 −26 include/session/onionreq/builder.hpp
+3 −0 include/session/onionreq/hop_encryption.hpp
+1 −0 include/session/onionreq/key_types.hpp
+4 −3 include/session/onionreq/parser.hpp
+5 −0 include/session/onionreq/response_parser.hpp
+36 −1 include/session/random.hpp
+21 −6 include/session/session_encrypt.h
+20 −2 include/session/session_encrypt.hpp
+38 −28 include/session/util.hpp
+8 −0 proto/CMakeLists.txt
+17 −16 src/CMakeLists.txt
+5 −9 src/config.cpp
+152 −91 src/config/base.cpp
+6 −65 src/config/community.cpp
+26 −23 src/config/contacts.cpp
+120 −117 src/config/convo_info_volatile.cpp
+21 −19 src/config/groups/info.cpp
+148 −116 src/config/groups/keys.cpp
+29 −26 src/config/groups/members.cpp
+1 −1 src/config/internal.cpp
+0 −8 src/config/internal.hpp
+0 −1 src/config/protos.cpp
+66 −61 src/config/user_groups.cpp
+14 −13 src/config/user_profile.cpp
+2 −2 src/curve25519.cpp
+38 −0 src/file.cpp
+6 −1 src/hash.cpp
+106 −0 src/logging.cpp
+3,262 −0 src/network.cpp
+156 −21 src/onionreq/builder.cpp
+16 −4 src/onionreq/hop_encryption.cpp
+8 −0 src/onionreq/key_types.cpp
+15 −7 src/onionreq/response_parser.cpp
+20 −0 src/random.cpp
+152 −7 src/session_encrypt.cpp
+85 −2 src/util.cpp
+28 −6 tests/CMakeLists.txt
+1 −1 tests/catch2_bt_format.hpp
+2 −11 tests/test_blinding.cpp
+1 −4 tests/test_config_convo_info_volatile.cpp
+0 −4 tests/test_config_user_groups.cpp
+18 −13 tests/test_config_userprofile.cpp
+9 −7 tests/test_configdata.cpp
+1 −1 tests/test_curve25519.cpp
+0 −2 tests/test_group_info.cpp
+12 −12 tests/test_group_keys.cpp
+0 −2 tests/test_group_members.cpp
+116 −0 tests/test_logging.cpp
+12 −8 tests/test_multi_encrypt.cpp
+1,467 −0 tests/test_network.cpp
+1 −0 tests/test_onionreq.cpp
+43 −2 tests/test_session_encrypt.cpp
+67 −0 tests/utils.hpp
+0 −2 utils/android.sh
+1 −1 utils/ci/drone-format-verify.sh
+1 −1 utils/format.sh
+25 −16 utils/ios.sh
+0 −2 utils/static-bundle.sh
13 changes: 13 additions & 0 deletions src/base_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include <unordered_set>

#include "session/config/base.hpp"
#include "session/logging.hpp"
#include "session/types.hpp"
#include "utilities.hpp"

Expand Down Expand Up @@ -106,6 +107,18 @@ class ConfigBaseImpl {

Napi::Env env = info.Env();

session::add_logger([env, class_name](auto msg) {
std::string toLog = "libsession-util:" + std::string(class_name) + ": " +
std::string(msg) + "\n";

Napi::Function consoleLog = env.Global()
.Get("console")
.As<Napi::Object>()
.Get("log")
.As<Napi::Function>();
consoleLog.Call({Napi::String::New(env, toLog)});
});

return config;
});
}
Expand Down
Loading