@@ -35,15 +35,17 @@ struct toJs_impl<member> {
35
35
obj[" memberStatus" ] = toJs (env, " PROMOTION_NOT_SENT" );
36
36
} else if (info.invite_status == 0 ) {
37
37
obj[" memberStatus" ] = toJs (env, " INVITE_ACCEPTED" );
38
- } else if (info.invite_pending ()) {
39
- obj[" memberStatus" ] = toJs (env, " INVITE_SENT " );
38
+ } else if (info.invite_not_sent ()) {
39
+ obj[" memberStatus" ] = toJs (env, " INVITE_NOT_SENT " );
40
40
} else if (info.invite_failed ()) {
41
41
obj[" memberStatus" ] = toJs (env, " INVITE_FAILED" );
42
42
} else {
43
- // this is probably a bad idea to have a catch-all else, but we have to when we consider
44
- // upgrades of libsession-util
45
- obj[" memberStatus" ] = toJs (env, " INVITE_NOT_SENT" );
43
+ // Note: INVITE_NOT_SENT is 3, which makes invite_pending() return true, so be sure to
44
+ // check for invite_not_sent() above. this is probably a bad idea to have a catch-all
45
+ // else, but we have to when we consider upgrades of libsession-util
46
+ obj[" memberStatus" ] = toJs (env, " INVITE_SENT" );
46
47
}
48
+
47
49
obj[" nominatedAdmin" ] = toJs (env, info.admin );
48
50
49
51
// removed status
@@ -94,7 +96,7 @@ class MetaGroupWrapper : public Napi::ObjectWrap<MetaGroupWrapper> {
94
96
Napi::Value memberGetAllPendingRemovals (const Napi::CallbackInfo& info);
95
97
Napi::Value memberGet (const Napi::CallbackInfo& info);
96
98
Napi::Value memberGetOrConstruct (const Napi::CallbackInfo& info);
97
- void memberConstructAndSet (const Napi::CallbackInfo& info);
99
+ Napi::Value memberConstructAndSet (const Napi::CallbackInfo& info);
98
100
99
101
void memberSetNameTruncated (const Napi::CallbackInfo& info);
100
102
void memberSetInvited (const Napi::CallbackInfo& info);
0 commit comments