Built motion from commit b5996064.|2.6.21
[motion2.git] / server / api / chatMessage / chatMessage.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 _0x972c=['register','length','remove','update','removeListener'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x972c,0xf2));var _0xc972=function(_0x2dc1bc,_0x292e62){_0x2dc1bc=_0x2dc1bc-0x0;var _0x190ee4=_0x972c[_0x2dc1bc];return _0x190ee4;};'use strict';var ChatMessageEvents=require('./chatMessage.events');var events=['save',_0xc972('0x0'),_0xc972('0x1')];function createListener(_0x5ebc6c,_0x3c04a5){return function(_0x1a41f9){_0x3c04a5['emit'](_0x5ebc6c,_0x1a41f9);};}function removeListener(_0x511ad4,_0x140e13){return function(){ChatMessageEvents[_0xc972('0x2')](_0x511ad4,_0x140e13);};}exports[_0xc972('0x3')]=function(_0x5dd2c8){for(var _0xd70261=0x0,_0x4cff66=events[_0xc972('0x4')];_0xd70261<_0x4cff66;_0xd70261++){var _0xd8cd25=events[_0xd70261];var _0x304d08=createListener('chatMessage:'+_0xd8cd25,_0x5dd2c8);ChatMessageEvents['on'](_0xd8cd25,_0x304d08);}};