|
@@ -123,7 +123,19 @@ export function localParticipantLeft() {
|
123
|
123
|
const participant = getLocalParticipant(getState);
|
124
|
124
|
|
125
|
125
|
if (participant) {
|
126
|
|
- return dispatch(participantLeft(participant.id));
|
|
126
|
+ return (
|
|
127
|
+ dispatch(
|
|
128
|
+ participantLeft(
|
|
129
|
+ participant.id,
|
|
130
|
+
|
|
131
|
+ // XXX Only the local participant is allowed to leave
|
|
132
|
+ // without stating the JitsiConference instance because
|
|
133
|
+ // the local participant is uniquely identified by the
|
|
134
|
+ // very fact that there is only one local participant
|
|
135
|
+ // (and the fact that the local participant "joins" at
|
|
136
|
+ // the beginning of the app and "leaves" at the end of
|
|
137
|
+ // the app).
|
|
138
|
+ undefined)));
|
127
|
139
|
}
|
128
|
140
|
};
|
129
|
141
|
}
|
|
@@ -234,17 +246,23 @@ export function participantJoined(participant) {
|
234
|
246
|
* Action to signal that a participant has left.
|
235
|
247
|
*
|
236
|
248
|
* @param {string} id - Participant's ID.
|
|
249
|
+ * @param {JitsiConference} conference - The {@code JitsiConference} associated
|
|
250
|
+ * with the participant identified by the specified {@code id}. Only the local
|
|
251
|
+ * participant is allowed to not specify an associated {@code JitsiConference}
|
|
252
|
+ * instance.
|
237
|
253
|
* @returns {{
|
238
|
254
|
* type: PARTICIPANT_LEFT,
|
239
|
255
|
* participant: {
|
|
256
|
+ * conference: JitsiConference,
|
240
|
257
|
* id: string
|
241
|
258
|
* }
|
242
|
259
|
* }}
|
243
|
260
|
*/
|
244
|
|
-export function participantLeft(id) {
|
|
261
|
+export function participantLeft(id, conference) {
|
245
|
262
|
return {
|
246
|
263
|
type: PARTICIPANT_LEFT,
|
247
|
264
|
participant: {
|
|
265
|
+ conference,
|
248
|
266
|
id
|
249
|
267
|
}
|
250
|
268
|
};
|