mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-13 10:52:40 +00:00
* feat(visitors): Handling of live conference and queue service. * squash: Small refactor mobile code. * squash: Drop debug log. * chore(deps) lib-jitsi-meet@latest https://github.com/jitsi/lib-jitsi-meet/compare/v1836.0.0+d05325f3...v1839.0.0+ea523fc6 * squash: Adds a count function. * squash: Drop debug print. * squash: Skip if queueService is not enabled. * squash: Avoids double subscribing for visitorsWaiting. * squash: Fixes lint error. * squash: Fixes showing dialog.
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import { appNavigate } from '../../app/actions.native';
|
|
import { IStore } from '../../app/types';
|
|
import { navigateRoot } from '../../mobile/navigation/rootNavigationContainerRef';
|
|
import { screen } from '../../mobile/navigation/routes';
|
|
import { JitsiConnectionErrors } from '../lib-jitsi-meet';
|
|
|
|
import { _connectInternal } from './actions.any';
|
|
|
|
export * from './actions.any';
|
|
|
|
/**
|
|
* Opens new connection.
|
|
*
|
|
* @param {string} [id] - The XMPP user's ID (e.g. {@code user@server.com}).
|
|
* @param {string} [password] - The XMPP user's password.
|
|
* @returns {Function}
|
|
*/
|
|
export function connect(id?: string, password?: string) {
|
|
return (dispatch: IStore['dispatch']) => dispatch(_connectInternal(id, password))
|
|
.catch(error => {
|
|
if (error === JitsiConnectionErrors.NOT_LIVE_ERROR) {
|
|
navigateRoot(screen.visitorsQueue);
|
|
}
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Hangup.
|
|
*
|
|
* @param {boolean} [_requestFeedback] - Whether to attempt showing a
|
|
* request for call feedback.
|
|
* @returns {Function}
|
|
*/
|
|
export function hangup(_requestFeedback = false) {
|
|
return (dispatch: IStore['dispatch']) => dispatch(appNavigate(undefined));
|
|
}
|