diff --git a/ios/sdk/src/invite/AddPeopleController.m b/ios/sdk/src/invite/AddPeopleController.m index b8daad2b7..323daaeb1 100644 --- a/ios/sdk/src/invite/AddPeopleController.m +++ b/ios/sdk/src/invite/AddPeopleController.m @@ -55,7 +55,8 @@ #pragma mark Internal API, used to call the delegate and report to the user -- (void)receivedResults:(NSArray *)results forQuery:(NSString *)query { +- (void)receivedResults:(NSArray *)results + forQuery:(NSString *)query { for (NSDictionary* item in results) { NSString* itemId = item[@"id"]; NSString* itemType = item[@"type"]; @@ -69,7 +70,9 @@ } } - [self.delegate addPeopleController:self didReceiveResults:results forQuery:query]; + [self.delegate addPeopleController:self + didReceiveResults:results + forQuery:query]; } - (void)inviteSettled:(NSArray *)failedInvitees { diff --git a/ios/sdk/src/invite/Invite.m b/ios/sdk/src/invite/Invite.m index 50622d2a4..510d5c086 100644 --- a/ios/sdk/src/invite/Invite.m +++ b/ios/sdk/src/invite/Invite.m @@ -24,10 +24,10 @@ // like it emits within the bounderies of a react-native module ony, it actually // also emits through DeviceEventEmitter. (Of course, Android emits only through // DeviceEventEmitter.) -static NSString * const InvitePerformQueryAction - = @"org.jitsi.meet:features/invite#performQuery"; -static NSString * const InvitePerformSubmitInviteAction +static NSString * const InviteEmitterEvent = @"org.jitsi.meet:features/invite#invite"; +static NSString * const PerformQueryEmitterEvent + = @"org.jitsi.meet:features/invite#performQuery"; @implementation Invite @@ -35,8 +35,8 @@ RCT_EXPORT_MODULE(); - (NSArray *)supportedEvents { return @[ - InvitePerformQueryAction, - InvitePerformSubmitInviteAction + InviteEmitterEvent, + PerformQueryEmitterEvent ]; } @@ -72,7 +72,7 @@ RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope - (void) invite:(NSArray * _Nonnull)invitees externalAPIScope:(NSString * _Nonnull)externalAPIScope addPeopleControllerScope:(NSString * _Nonnull) addPeopleControllerScope { - [self sendEventWithName:InvitePerformSubmitInviteAction + [self sendEventWithName:InviteEmitterEvent body:@{ @"addPeopleControllerScope": addPeopleControllerScope, @"externalAPIScope": externalAPIScope, @"invitees": invitees }]; @@ -81,7 +81,7 @@ RCT_EXPORT_METHOD(receivedResults:(NSString *)externalAPIScope - (void) performQuery:(NSString * _Nonnull)query externalAPIScope:(NSString * _Nonnull)externalAPIScope addPeopleControllerScope:(NSString * _Nonnull) addPeopleControllerScope { - [self sendEventWithName:InvitePerformQueryAction + [self sendEventWithName:PerformQueryEmitterEvent body:@{ @"addPeopleControllerScope": addPeopleControllerScope, @"externalAPIScope": externalAPIScope, @"query": query }]; diff --git a/react/features/invite/middleware.native.js b/react/features/invite/middleware.native.js index 663493ca1..800a725f3 100644 --- a/react/features/invite/middleware.native.js +++ b/react/features/invite/middleware.native.js @@ -79,13 +79,13 @@ function _appWillMount({ dispatch, getState }, next, action) { dispatch({ type: _SET_EMITTER_SUBSCRIPTIONS, emitterSubscriptions: [ - emitter.addListener( - 'org.jitsi.meet:features/invite#performQuery', - _onPerformQuery, - context), emitter.addListener( 'org.jitsi.meet:features/invite#invite', _onInvite, + context), + emitter.addListener( + 'org.jitsi.meet:features/invite#performQuery', + _onPerformQuery, context) ] });