25 lines
841 B
TypeScript
25 lines
841 B
TypeScript
// Metro module 13568 (f13569).
|
|
import ChannelStore from "../../stores/ChannelStore";
|
|
import RTCConnectionStore from "../../stores/RTCConnectionStore";
|
|
import ChannelRTCStore from "./ChannelRTCStore";
|
|
import ChannelRTCActionCreators from "../../actions/ChannelRTCActionCreators";
|
|
export function toggleVoiceChannelChat(a0) {
|
|
if (RTCConnectionStore.isConnected()) {
|
|
const channelId = RTCConnectionStore.getChannelId();
|
|
if (channelId == null) {
|
|
return null;
|
|
}
|
|
const channel = ChannelStore.getChannel(channelId);
|
|
if (channel != null && channel.isGuildVoice()) {
|
|
const chatOpen = a0 == null ? !ChannelRTCStore.getChatOpen(channelId) : a0;
|
|
ChannelRTCActionCreators.updateChatOpen(channelId, chatOpen);
|
|
return {
|
|
channelId,
|
|
chatOpen
|
|
};
|
|
}
|
|
return null;
|
|
}
|
|
return null;
|
|
}
|