Coding style/naming: invite & invitee(s)

Hristo Terezov, Chris Cordle, and I/Lyubomir Marinov agreed that we'd
try to use "invite" & "invitee(s)" in Web/React's iframe API,
mobile/react-native's SDK invite API, and internally for the purposes of
consistency, ease of understanding, etc.
This commit is contained in:
Lyubo Marinov
2018-05-02 20:20:31 -05:00
committed by Saúl Ibarra Corretgé
parent 69eefc82a5
commit 520bb8bd22
5 changed files with 177 additions and 171 deletions
+14 -9
View File
@@ -1,12 +1,12 @@
// @flow
import * as JitsiMeetConferenceEvents from '../../ConferenceEvents';
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import {
createApiEvent,
sendAnalytics
} from '../../react/features/analytics';
import { sendInvitesForItems } from '../../react/features/invite';
import { parseJWTFromURLParams } from '../../react/features/base/jwt';
import { invite } from '../../react/features/invite';
import { getJitsiMeetTransport } from '../transport';
import { API_ID } from './constants';
@@ -114,15 +114,20 @@ function initCommands() {
switch (name) {
case 'invite':
APP.store.dispatch(
sendInvitesForItems(request.invitees))
.then(failedInvites => {
const failed = failedInvites.length === 0;
invite(request.invitees))
.then(failedInvitees => {
let error;
let result;
if (failedInvitees.length) {
error = new Error('One or more invites failed!');
} else {
result = true;
}
callback({
result: failed ? undefined : true,
error: failed
? new Error('One or more invites failed!')
: undefined
error,
result
});
});
break;