@@ -11,32 +11,7 @@ namespace session::nodeapi {
11
11
12
12
MetaGroupWrapper::MetaGroupWrapper (const Napi::CallbackInfo& info) :
13
13
meta_group{std::move (MetaBaseWrapper::constructGroupWrapper (info, " MetaGroupWrapper" ))},
14
- Napi::ObjectWrap<MetaGroupWrapper>{info} {
15
- auto env = info.Env ();
16
- // this->meta_group->members->logger = [env](session::config::LogLevel, std::string_view x) {
17
- // std::string toLog = "libsession-util:MetaGroup:Member: " + std::string(x) + "\n";
18
-
19
- // Napi::Function consoleLog =
20
- // env.Global().Get("console").As<Napi::Object>().Get("log").As<Napi::Function>();
21
- // consoleLog.Call({Napi::String::New(env, toLog)});
22
- // };
23
- // this->meta_group->info->logger = [env](session::config::LogLevel, std::string_view x) {
24
- // std::string toLog = "libsession-util:MetaGroup:Info: " + std::string(x) + "\n";
25
-
26
- // Napi::Function consoleLog =
27
- // env.Global().Get("console").As<Napi::Object>().Get("log").As<Napi::Function>();
28
- // consoleLog.Call({Napi::String::New(env, toLog)});
29
- // };
30
- // this->meta_group->keys->logger = [env](
31
- // session::config::LogLevel,
32
- // std::string_view x) {
33
- // std::string toLog = "libsession-util:MetaGroup:Keys: " + std::string(x) + "\n";
34
-
35
- // Napi::Function consoleLog =
36
- // env.Global().Get("console").As<Napi::Object>().Get("log").As<Napi::Function>();
37
- // consoleLog.Call({Napi::String::New(env, toLog)});
38
- // };
39
- }
14
+ Napi::ObjectWrap<MetaGroupWrapper>{info} {}
40
15
41
16
void MetaGroupWrapper::Init (Napi::Env env, Napi::Object exports) {
42
17
MetaBaseWrapper::NoBaseClassInitHelper<MetaGroupWrapper>(
@@ -152,8 +127,6 @@ Napi::Value MetaGroupWrapper::needsDump(const Napi::CallbackInfo& info) {
152
127
153
128
Napi::Value MetaGroupWrapper::metaDump (const Napi::CallbackInfo& info) {
154
129
return wrapResult (info, [&] {
155
- auto env = info.Env ();
156
-
157
130
oxenc::bt_dict_producer combined;
158
131
159
132
// NOTE: the keys have to be in ascii-sorted order:
@@ -168,8 +141,6 @@ Napi::Value MetaGroupWrapper::metaDump(const Napi::CallbackInfo& info) {
168
141
169
142
Napi::Value MetaGroupWrapper::metaMakeDump (const Napi::CallbackInfo& info) {
170
143
return wrapResult (info, [&] {
171
- auto env = info.Env ();
172
-
173
144
oxenc::bt_dict_producer combined;
174
145
175
146
// NOTE: the keys have to be in ascii-sorted order:
@@ -192,7 +163,6 @@ void MetaGroupWrapper::metaConfirmPushed(const Napi::CallbackInfo& info) {
192
163
193
164
auto groupInfo = obj.Get (" groupInfo" );
194
165
auto groupMember = obj.Get (" groupMember" );
195
- auto groupKeys = obj.Get (" groupKeys" );
196
166
197
167
if (!groupInfo.IsNull () && !groupInfo.IsUndefined ()) {
198
168
assertIsArray (groupInfo);
@@ -429,7 +399,6 @@ Napi::Value MetaGroupWrapper::memberGetAllPendingRemovals(const Napi::CallbackIn
429
399
430
400
Napi::Value MetaGroupWrapper::memberGet (const Napi::CallbackInfo& info) {
431
401
return wrapResult (info, [&] {
432
- auto env = info.Env ();
433
402
assertInfoLength (info, 1 );
434
403
assertIsString (info[0 ]);
435
404
@@ -440,7 +409,6 @@ Napi::Value MetaGroupWrapper::memberGet(const Napi::CallbackInfo& info) {
440
409
441
410
Napi::Value MetaGroupWrapper::memberGetOrConstruct (const Napi::CallbackInfo& info) {
442
411
return wrapResult (info, [&] {
443
- auto env = info.Env ();
444
412
assertInfoLength (info, 1 );
445
413
assertIsString (info[0 ]);
446
414
@@ -475,7 +443,6 @@ Napi::Value MetaGroupWrapper::memberSetInvited(const Napi::CallbackInfo& info) {
475
443
this ->meta_group ->members ->set (m);
476
444
477
445
return this ->meta_group ->members ->get_or_construct (pubkeyHex);
478
-
479
446
});
480
447
}
481
448
0 commit comments