5f7b3eb83cf781325420bfdd8849c2380adfeda0
[motion2.git] / server / api / chatInteraction / chatInteraction.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 _0x3aca=['./chatInteraction.events','save','remove','update','removeListener','register'];(function(_0x5292e4,_0x388873){var _0x109411=function(_0x19d1dc){while(--_0x19d1dc){_0x5292e4['push'](_0x5292e4['shift']());}};_0x109411(++_0x388873);}(_0x3aca,0xea));var _0xa3ac=function(_0x1314d4,_0xb0b16d){_0x1314d4=_0x1314d4-0x0;var _0x584ba5=_0x3aca[_0x1314d4];return _0x584ba5;};'use strict';var ChatInteractionEvents=require(_0xa3ac('0x0'));var events=[_0xa3ac('0x1'),_0xa3ac('0x2'),_0xa3ac('0x3')];function createListener(_0x1073b7,_0x24078b){return function(_0x48e230){_0x24078b['emit'](_0x1073b7,_0x48e230);};}function removeListener(_0x119c9b,_0x260c82){return function(){ChatInteractionEvents[_0xa3ac('0x4')](_0x119c9b,_0x260c82);};}exports[_0xa3ac('0x5')]=function(_0x309e5c){for(var _0x2808ff=0x0,_0x397b84=events['length'];_0x2808ff<_0x397b84;_0x2808ff++){var _0x2eb8fb=events[_0x2808ff];var _0x1891d6=createListener('chatInteraction:'+_0x2eb8fb,_0x309e5c);ChatInteractionEvents['on'](_0x2eb8fb,_0x1891d6);}};