4f8b58658df93b5d87562cc1a871f95a04bdc514
[motion2.git] / server / api / chatQueue / chatQueue.socket.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x0b78=['removeListener','length','chatQueue:','./chatQueue.events','save','update'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x0b78,0x1ad));var _0x80b7=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0b78[_0x321bb2];return _0x9c12ed;};'use strict';var ChatQueueEvents=require(_0x80b7('0x0'));var events=[_0x80b7('0x1'),'remove',_0x80b7('0x2')];function createListener(_0x4f55ab,_0x4bffac){return function(_0x261012){_0x4bffac['emit'](_0x4f55ab,_0x261012);};}function removeListener(_0x6a187e,_0x89d4d7){return function(){ChatQueueEvents[_0x80b7('0x3')](_0x6a187e,_0x89d4d7);};}exports['register']=function(_0x49bc7f){for(var _0x167ddd=0x0,_0x584401=events[_0x80b7('0x4')];_0x167ddd<_0x584401;_0x167ddd++){var _0x122ebe=events[_0x167ddd];var _0x3c248d=createListener(_0x80b7('0x5')+_0x122ebe,_0x49bc7f);ChatQueueEvents['on'](_0x122ebe,_0x3c248d);}};