1616#include " oxenc/hex.h"
1717#include " session/config/namespaces.hpp"
1818#include " session/config/profile_pic.hpp"
19- #include " session/session_protocol.h "
19+ #include " session/session_protocol.hpp "
2020#include " session/types.h"
2121#include " session/types.hpp"
2222
@@ -401,8 +401,9 @@ Napi::Object decrypt_result_to_JS(
401401
402402confirm_pushed_entry_t confirm_pushed_entry_from_JS (const Napi::Env& env, const Napi::Object& obj);
403403
404- Napi::BigInt proFeaturesToJsBitset (
405- const Napi::Env& env, const SESSION_PROTOCOL_PRO_FEATURES bitset);
404+ Napi::BigInt proProfileBitsetToJS (const Napi::Env& env, const ProProfileBitset bitset);
405+
406+ Napi::BigInt proMessageBitsetToJS (const Napi::Env& env, const ProMessageBitset bitset);
406407
407408std::span<const uint8_t > from_hex_to_span (std::string_view x);
408409
@@ -413,10 +414,11 @@ template <std::size_t N>
413414std::array<uint8_t , N> from_hex_to_array (std::string x) {
414415 std::string as_hex = oxenc::from_hex (x);
415416 if (as_hex.size () != N) {
416- throw std::invalid_argument (fmt::format (
417- " from_hex_to_array: Decoded hex size mismatch: expected {}, got {}" ,
418- N,
419- as_hex.size ()));
417+ throw std::invalid_argument (
418+ fmt::format (
419+ " from_hex_to_array: Decoded hex size mismatch: expected {}, got {}" ,
420+ N,
421+ as_hex.size ()));
420422 }
421423
422424 std::array<uint8_t , N> result;
@@ -432,16 +434,15 @@ std::vector<unsigned char> from_base64_to_vector(std::string_view x);
432434// Concept to match containers with a size() method
433435template <typename T>
434436concept HasSize = requires (T t) {
435- {
436- t.size ()
437- } -> std::convertible_to<size_t >;
437+ {t.size ()}->std ::convertible_to<size_t >;
438438};
439439
440440template <HasSize T>
441441void assert_length (const T& x, size_t n, std::string_view base_identifier) {
442442 if (x.size () != n) {
443- throw std::invalid_argument (fmt::format (
444- " assert_length: expected {}, got {} for {}" , n, x.size (), base_identifier));
443+ throw std::invalid_argument (
444+ fmt::format (
445+ " assert_length: expected {}, got {} for {}" , n, x.size (), base_identifier));
445446 }
446447}
447448
0 commit comments