Built motion from commit 10af8726.|2.6.34
[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 _0xeb0d=['removeListener','register','./chatMessage.events','emit'];(function(_0xcda377,_0x1e2678){var _0x1c024f=function(_0x1aeb61){while(--_0x1aeb61){_0xcda377['push'](_0xcda377['shift']());}};_0x1c024f(++_0x1e2678);}(_0xeb0d,0xe2));var _0xdeb0=function(_0x50df1f,_0x45b8b1){_0x50df1f=_0x50df1f-0x0;var _0x5180e3=_0xeb0d[_0x50df1f];return _0x5180e3;};'use strict';var ChatMessageEvents=require(_0xdeb0('0x0'));var events=['save','remove','update'];function createListener(_0x256ce4,_0x430873){return function(_0x538fc2){_0x430873[_0xdeb0('0x1')](_0x256ce4,_0x538fc2);};}function removeListener(_0x36367c,_0xd8dd51){return function(){ChatMessageEvents[_0xdeb0('0x2')](_0x36367c,_0xd8dd51);};}exports[_0xdeb0('0x3')]=function(_0x13d486){for(var _0xc48108=0x0,_0x27ebaa=events['length'];_0xc48108<_0x27ebaa;_0xc48108++){var _0x28a1a4=events[_0xc48108];var _0x16b36b=createListener('chatMessage:'+_0x28a1a4,_0x13d486);ChatMessageEvents['on'](_0x28a1a4,_0x16b36b);}};