uawdijnntqw1x1x1
IP : 3.19.120.1
Hostname : axolotl
Kernel : Linux axolotl 4.9.0-13-amd64 #1 SMP Debian 4.9.228-1 (2020-07-05) x86_64
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
OS : Linux
PATH:
/
var
/
www
/
axolotl
/
data
/
www
/
axolotl.ru
/
www
/
bitrix
/
js
/
imopenlines
/
component
/
widget
/
src
/
pull.handler.js
/
/
/** * Bitrix OpenLines widget * Widget pull commands (Pull Command Handler) * * @package bitrix * @subpackage imopenlines * @copyright 2001-2019 Bitrix */ import {SubscriptionType, VoteType} from "./const"; class WidgetImPullCommandHandler { static create(params = {}) { return new this(params); } getModuleId() { return 'im'; } constructor(params) { this.controller = params.controller; this.store = params.store; this.widget = params.widget; } handleMessageChat(params, extra, command) { if (params.message.senderId != this.controller.application.getUserId()) { this.widget.sendEvent({ type: SubscriptionType.operatorMessage, data: params }); if (!this.store.state.widget.common.showed && !this.widget.onceShowed) { this.widget.onceShowed = true; this.widget.open(); } } } } class WidgetImopenlinesPullCommandHandler { static create(params = {}) { return new this(params); } constructor(params = {}) { this.controller = params.controller; this.store = params.store; this.widget = params.widget; } getModuleId() { return 'imopenlines'; } handleSessionStart(params, extra, command) { this.store.commit('widget/dialog', { sessionId: params.sessionId, sessionClose: false, sessionStatus: 0, userVote: VoteType.none, }); this.store.dispatch('widget/setVoteDateFinish', ''); this.widget.sendEvent({ type: SubscriptionType.sessionStart, data: { sessionId: params.sessionId } }); } handleSessionOperatorChange(params, extra, command) { this.store.commit('widget/dialog', { operator: params.operator, operatorChatId: params.operatorChatId }); this.widget.sendEvent({ type: SubscriptionType.sessionOperatorChange, data: { operator: params.operator } }); } handleSessionStatus(params, extra, command) { this.store.commit('widget/dialog', { sessionId: params.sessionId, sessionStatus: params.sessionStatus, sessionClose: params.sessionClose, }); this.widget.sendEvent({ type: SubscriptionType.sessionStatus, data: { sessionId: params.sessionId, sessionStatus: params.sessionStatus } }); if (params.sessionClose) { this.widget.sendEvent({ type: SubscriptionType.sessionFinish, data: { sessionId: params.sessionId, sessionStatus: params.sessionStatus } }); if (!params.spam) { this.store.commit('widget/dialog', { operator: { name: '', firstName: '', lastName: '', workPosition: '', avatar: '', online: false, } }); } } } handleSessionDateCloseVote(params, extra, command) { this.store.dispatch('widget/setVoteDateFinish', params.dateCloseVote); } } export { WidgetImPullCommandHandler, WidgetImopenlinesPullCommandHandler, };
/var/www/axolotl/data/www/axolotl.ru/www/bitrix/js/imopenlines/component/widget/src/pull.handler.js