@@ -110,8 +110,10 @@ void MetaGroupWrapper::Init(Napi::Env env, Napi::Object exports) {
110
110
&MetaGroupWrapper::membersMarkPendingRemoval),
111
111
InstanceMethod (
112
112
" memberSetNameTruncated" , &MetaGroupWrapper::memberSetNameTruncated),
113
+ InstanceMethod (" memberSetSupplement" , &MetaGroupWrapper::memberSetSupplement),
113
114
InstanceMethod (" memberSetInviteSent" , &MetaGroupWrapper::memberSetInviteSent),
114
- InstanceMethod (" memberSetInviteNotSent" , &MetaGroupWrapper::memberSetInviteNotSent),
115
+ InstanceMethod (
116
+ " memberSetInviteNotSent" , &MetaGroupWrapper::memberSetInviteNotSent),
115
117
InstanceMethod (
116
118
" memberSetInviteFailed" , &MetaGroupWrapper::memberSetInviteFailed),
117
119
InstanceMethod (
@@ -532,6 +534,19 @@ void MetaGroupWrapper::memberSetNameTruncated(const Napi::CallbackInfo& info) {
532
534
});
533
535
}
534
536
537
+ void MetaGroupWrapper::memberSetSupplement (const Napi::CallbackInfo& info) {
538
+ wrapExceptions (info, [&] {
539
+ assertIsString (info[0 ]);
540
+
541
+ auto pubkeyHex = toCppString (info[0 ], " memberSetSupplement pubkeyHex" );
542
+ auto m = this ->meta_group ->members ->get (pubkeyHex);
543
+ if (m) {
544
+ m->supplement = true ;
545
+ this ->meta_group ->members ->set (*m);
546
+ }
547
+ });
548
+ }
549
+
535
550
void MetaGroupWrapper::memberSetInviteFailed (const Napi::CallbackInfo& info) {
536
551
wrapExceptions (info, [&] {
537
552
assertIsString (info[0 ]);
@@ -558,7 +573,6 @@ void MetaGroupWrapper::memberSetInviteSent(const Napi::CallbackInfo& info) {
558
573
});
559
574
}
560
575
561
-
562
576
void MetaGroupWrapper::memberSetInviteNotSent (const Napi::CallbackInfo& info) {
563
577
wrapExceptions (info, [&] {
564
578
assertIsString (info[0 ]);
0 commit comments