@@ -35,15 +35,17 @@ struct toJs_impl<member> {
3535 obj[" memberStatus" ] = toJs (env, " PROMOTION_NOT_SENT" );
3636 } else if (info.invite_status == 0 ) {
3737 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 " );
4040 } else if (info.invite_failed ()) {
4141 obj[" memberStatus" ] = toJs (env, " INVITE_FAILED" );
4242 } 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" );
4647 }
48+
4749 obj[" nominatedAdmin" ] = toJs (env, info.admin );
4850
4951 // removed status
@@ -94,7 +96,7 @@ class MetaGroupWrapper : public Napi::ObjectWrap<MetaGroupWrapper> {
9496 Napi::Value memberGetAllPendingRemovals (const Napi::CallbackInfo& info);
9597 Napi::Value memberGet (const Napi::CallbackInfo& info);
9698 Napi::Value memberGetOrConstruct (const Napi::CallbackInfo& info);
97- void memberConstructAndSet (const Napi::CallbackInfo& info);
99+ Napi::Value memberConstructAndSet (const Napi::CallbackInfo& info);
98100
99101 void memberSetNameTruncated (const Napi::CallbackInfo& info);
100102 void memberSetInvited (const Napi::CallbackInfo& info);
0 commit comments