2023-02-21 09:26:04 +00:00
|
|
|
/* eslint-disable lines-around-comment, max-len */
|
|
|
|
|
|
|
|
import { navigate }
|
|
|
|
// @ts-ignore
|
|
|
|
from '../mobile/navigation/components/conference/ConferenceNavigationContainerRef';
|
|
|
|
// @ts-ignore
|
|
|
|
import { screen } from '../mobile/navigation/routes';
|
|
|
|
|
2021-02-12 11:18:16 +00:00
|
|
|
import { OPEN_CHAT } from './actionTypes';
|
2020-07-21 12:21:01 +00:00
|
|
|
|
|
|
|
export * from './actions.any';
|
|
|
|
|
|
|
|
/**
|
2021-02-12 11:18:16 +00:00
|
|
|
* Displays the chat panel.
|
2020-07-21 12:21:01 +00:00
|
|
|
*
|
2021-02-12 11:18:16 +00:00
|
|
|
* @param {Object} participant - The recipient for the private chat.
|
2023-02-21 09:26:04 +00:00
|
|
|
* @param {boolean} disablePolls - Checks if polls are disabled.
|
2021-02-12 11:18:16 +00:00
|
|
|
*
|
|
|
|
* @returns {{
|
2023-02-21 09:26:04 +00:00
|
|
|
* participant: participant,
|
2021-02-12 11:18:16 +00:00
|
|
|
* type: OPEN_CHAT
|
|
|
|
* }}
|
2020-07-21 12:21:01 +00:00
|
|
|
*/
|
2023-02-21 09:26:04 +00:00
|
|
|
export function openChat(participant: Object, disablePolls: boolean) {
|
|
|
|
if (disablePolls) {
|
|
|
|
navigate(screen.conference.chat);
|
|
|
|
}
|
|
|
|
navigate(screen.conference.chatandpolls.main);
|
|
|
|
|
2021-02-12 11:18:16 +00:00
|
|
|
return {
|
|
|
|
participant,
|
|
|
|
type: OPEN_CHAT
|
2020-07-21 12:21:01 +00:00
|
|
|
};
|
|
|
|
}
|