Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
misc: remove dead code 🔥🔥🔥 (#2844)
Saúl Ibarra Corretgé2861d8d24e7d
diff --git a/conference.js b/conference.jsindex a1a70ef61e..85d7d30716 100644--- a/conference.js+++ b/conference.js@@ -2124,13 +2124,6 @@ export default {room.toggleRecording(options);});- APP.UI.addListener(UIEvents.SUBJECT_CHANGED, topic => {- room.setSubject(topic);- });- room.on(JitsiConferenceEvents.SUBJECT_CHANGED, subject => {- APP.UI.setSubject(subject);- });-APP.UI.addListener(UIEvents.AUTH_CLICKED, () => {AuthHandler.authenticate(room);});diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex dff0144175..14582665a9 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -444,12 +444,6 @@ UI.addRemoteStream = track => VideoLayout.onRemoteStreamAdded(track);*/UI.removeRemoteStream = track => VideoLayout.onRemoteStreamRemoved(track);-/**- * Update chat subject.- * @param {string} subject new chat subject- */-UI.setSubject = subject => Chat.setSubject(subject);-/*** Setup and show Etherpad.* @param {string} name etherpad iddiff --git a/modules/UI/side_pannels/chat/Chat.js b/modules/UI/side_pannels/chat/Chat.jsindex 2481dec093..fc74b64f92 100644--- a/modules/UI/side_pannels/chat/Chat.js+++ b/modules/UI/side_pannels/chat/Chat.js@@ -1,7 +1,6 @@/* global APP, $ */-import { processReplacements, linkify } from './Replacement';-import CommandsProcessor from './Commands';+import { processReplacements } from './Replacement';import VideoLayout from '../../videolayout/VideoLayout';import UIUtil from '../../util/UIUtil';@@ -12,8 +11,7 @@ import { smileys } from './smileys';import { addMessage, markAllRead } from '../../../../react/features/chat';import {dockToolbox,- getToolboxHeight,- setSubject+ getToolboxHeight} from '../../../../react/features/toolbox';let unreadMessages = 0;@@ -235,15 +233,10 @@ const Chat = {usermsg.val('').trigger('autosize.resize');this.focus();// eslint-disable-line no-invalid-this- const command = new CommandsProcessor(value, eventEmitter);- if (command.isCommand()) {- command.processCommand();- } else {- const message = UIUtil.escapeHtml(value);+ const message = UIUtil.escapeHtml(value);- eventEmitter.emit(UIEvents.MESSAGE_CREATED, message);- }+ eventEmitter.emit(UIEvents.MESSAGE_CREATED, message);}});@@ -351,21 +344,6 @@ const Chat = {{ scrollTop: $('#chatconversation')[0].scrollHeight }, 1000);},- /**- * Sets the subject to the UI- * @param subject the subject- */- setSubject(subject) {- if (subject) {- // eslint-disable-next-line no-param-reassign- subject = subject.trim();- }-- const html = linkify(UIUtil.escapeHtml(subject));-- APP.store.dispatch(setSubject(html));- },-/*** Sets the chat conversation mode.* Conversation mode is the normal chat mode, non conversation mode isdiff --git a/modules/UI/side_pannels/chat/Commands.js b/modules/UI/side_pannels/chat/Commands.jsdeleted file mode 100644index 7602abf2ef..0000000000--- a/modules/UI/side_pannels/chat/Commands.js+++ /dev/null@@ -1,94 +0,0 @@-import UIUtil from '../../util/UIUtil';-import UIEvents from '../../../../service/UI/UIEvents';--/**- * List with supported commands. The keys are the names of the commands and- * the value is the function that processes the message.- * @type {{String: function}}- */-const commands = {- 'topic': processTopic-};--/**- * Extracts the command from the message.- * @param message the received message- * @returns {string} the command- */-function getCommand(message) {- if (message) {- for (const command in commands) {- if (message.indexOf(`/${command}`) === 0) {- return command;- }- }- }-- return '';-}--/**- * Processes the data for topic command.- * @param commandArguments the arguments of the topic command.- */-function processTopic(commandArguments, emitter) {- const topic = UIUtil.escapeHtml(commandArguments);-- emitter.emit(UIEvents.SUBJECT_CHANGED, topic);-}--/**- * Constructs a new CommandProccessor instance from a message that- * handles commands received via chat messages.- * @param message the message- * @constructor- */-function CommandsProcessor(message, emitter) {- const command = getCommand(message);-- this.emitter = emitter;-- /**- * Returns the name of the command.- * @returns {String} the command- */- this.getCommand = function() {- return command;- };--- const messageArgument = message.substr(command.length + 2);-- /**- * Returns the arguments of the command.- * @returns {string}- */- this.getArgument = function() {- return messageArgument;- };-}--/**- * Checks whether this instance is valid command or not.- * @returns {boolean}- */-CommandsProcessor.prototype.isCommand = function() {- if (this.getCommand()) {- return true;- }-- return false;-};--/**- * Processes the command.- */-CommandsProcessor.prototype.processCommand = function() {- if (!this.isCommand()) {- return;- }-- commands[this.getCommand()](this.getArgument(), this.emitter);-};--export default CommandsProcessor;diff --git a/react/features/toolbox/actionTypes.js b/react/features/toolbox/actionTypes.jsindex 542a86796d..2caffea65a 100644--- a/react/features/toolbox/actionTypes.js+++ b/react/features/toolbox/actionTypes.js@@ -18,18 +18,6 @@ export const CLEAR_TOOLBOX_TIMEOUT = Symbol('CLEAR_TOOLBOX_TIMEOUT');*/export const FULL_SCREEN_CHANGED = Symbol('FULL_SCREEN_CHANGED');-/**- * The type of the action which sets the default toolbar buttons of the Toolbox.- *- * {- * type: SET_DEFAULT_TOOLBOX_BUTTONS,- * primaryToolbarButtons: Map,- * secondaryToolbarButtons: Map- * }- */-export const SET_DEFAULT_TOOLBOX_BUTTONS- = Symbol('SET_DEFAULT_TOOLBOX_BUTTONS');-/*** The type of (redux) action which requests full screen mode be entered or* exited.@@ -41,26 +29,6 @@ export const SET_DEFAULT_TOOLBOX_BUTTONS*/export const SET_FULL_SCREEN = Symbol('SET_FULL_SCREEN');-/**- * The type of the action which sets the conference subject.- *- * {- * type: SET_SUBJECT,- * subject: string- * }- */-export const SET_SUBJECT = Symbol('SET_SUBJECT');--/**- * The type of the action which sets the subject slide in.- *- * {- * type: SET_SUBJECT_SLIDE_IN,- * subjectSlideIn: boolean- * }- */-export const SET_SUBJECT_SLIDE_IN = Symbol('SET_SUBJECT_SLIDE_IN');-/*** The type of the action which sets the indicator which determiens whether a* fToolbar in the Toolbox is hovered.diff --git a/react/features/toolbox/actions.native.js b/react/features/toolbox/actions.native.jsindex a7b1b0b07b..e669a99cb6 100644--- a/react/features/toolbox/actions.native.js+++ b/react/features/toolbox/actions.native.js@@ -2,8 +2,6 @@import {CLEAR_TOOLBOX_TIMEOUT,- SET_SUBJECT,- SET_SUBJECT_SLIDE_IN,SET_TOOLBAR_HOVERED,SET_TOOLBOX_ALWAYS_VISIBLE,SET_TOOLBOX_ENABLED,@@ -26,36 +24,6 @@ export function clearToolboxTimeout(): Object {};}-/**- * Signals that value of conference subject should be changed.- *- * @param {string} subject - Conference subject string.- * @returns {Object}- */-export function setSubject(subject: string): Object {- return {- type: SET_SUBJECT,- subject- };-}--/**- * Signals that toolbox subject slide in value should be changed.- *- * @param {boolean} subjectSlideIn - True if the subject is shown; otherwise,- * false.- * @returns {{- * type: SET_SUBJECT_SLIDE_IN,- * subjectSlideIn: boolean- * }}- */-export function setSubjectSlideIn(subjectSlideIn: boolean): Object {- return {- type: SET_SUBJECT_SLIDE_IN,- subjectSlideIn- };-}-/*** Signals that toolbar is hovered value should be changed.*diff --git a/react/features/toolbox/actions.web.js b/react/features/toolbox/actions.web.jsindex ae6f9ebae7..78fd7c2d99 100644--- a/react/features/toolbox/actions.web.js+++ b/react/features/toolbox/actions.web.js@@ -5,7 +5,6 @@ import SideContainerTogglerimport {clearToolboxTimeout,- setSubjectSlideIn,setToolboxTimeout,setToolboxTimeoutMS,setToolboxVisible@@ -98,7 +97,6 @@ export function hideToolbox(force: boolean = false): Function {timeoutMS));} else {dispatch(setToolboxVisible(false));- dispatch(setSubjectSlideIn(false));}};}@@ -137,7 +135,6 @@ export function showToolbox(timeout: number = 0): Object {if (enabled && !visible) {dispatch(setToolboxVisible(true));- dispatch(setSubjectSlideIn(true));// If the Toolbox is always visible, there's no need for a timeout// to toggle its visibility.diff --git a/react/features/toolbox/reducer.js b/react/features/toolbox/reducer.jsindex 2e60fa8598..36d7af5d63 100644--- a/react/features/toolbox/reducer.js+++ b/react/features/toolbox/reducer.js@@ -5,9 +5,6 @@ import { ReducerRegistry } from '../base/redux';import {CLEAR_TOOLBOX_TIMEOUT,FULL_SCREEN_CHANGED,- SET_DEFAULT_TOOLBOX_BUTTONS,- SET_SUBJECT,- SET_SUBJECT_SLIDE_IN,SET_TOOLBAR_HOVERED,SET_TOOLBOX_ALWAYS_VISIBLE,SET_TOOLBOX_ENABLED,@@ -24,11 +21,8 @@ declare var interfaceConfig: Object;* @private* @returns {{* alwaysVisible: boolean,+ * enabled: boolean,* hovered: boolean,- * primaryToolbarButtons: Map,- * secondaryToolbarButtons: Map,- * subject: string,- * subjectSlideIn: boolean,* timeoutID: number,* timeoutMS: number,* visible: boolean@@ -68,34 +62,6 @@ function _getInitialState() {*/hovered: false,- /**- * A Map of the default buttons of the PrimaryToolbar.- *- * @type {Map}- */- primaryToolbarButtons: new Map(),-- /**- * A Map of the default buttons of the SecondaryToolbar.- *- * @type {Map}- */- secondaryToolbarButtons: new Map(),-- /**- * The text of the conference subject.- *- * @type {string}- */- subject: '',-- /**- * The indicator which determines whether the subject is sliding in.- *- * @type {boolean}- */- subjectSlideIn: false,-/*** A number, non-zero value which identifies the timer created by a call* to setTimeout() with timeoutMS.@@ -137,28 +103,6 @@ ReducerRegistry.register(fullScreen: action.fullScreen};- case SET_DEFAULT_TOOLBOX_BUTTONS: {- const { primaryToolbarButtons, secondaryToolbarButtons } = action;-- return {- ...state,- primaryToolbarButtons,- secondaryToolbarButtons- };- }-- case SET_SUBJECT:- return {- ...state,- subject: action.subject- };-- case SET_SUBJECT_SLIDE_IN:- return {- ...state,- subjectSlideIn: action.subjectSlideIn- };-case SET_TOOLBAR_HOVERED:return {...state,diff --git a/service/UI/UIEvents.js b/service/UI/UIEvents.jsindex d2052242ad..007bb42b34 100644--- a/service/UI/UIEvents.js+++ b/service/UI/UIEvents.js@@ -70,7 +70,6 @@ export default {HANGUP: 'UI.hangup',LOGOUT: 'UI.logout',RECORDING_TOGGLED: 'UI.recording_toggled',- SUBJECT_CHANGED: 'UI.subject_changed',VIDEO_DEVICE_CHANGED: 'UI.video_device_changed',AUDIO_DEVICE_CHANGED: 'UI.audio_device_changed',AUDIO_OUTPUT_DEVICE_CHANGED: 'UI.audio_output_device_changed',