Built motion from commit 3e059bc2.|2.5.32
[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 _0x6011=['length','removeListener','register'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0x6011,0x196));var _0x1601=function(_0x56f3ba,_0x196c15){_0x56f3ba=_0x56f3ba-0x0;var _0x3794bb=_0x6011[_0x56f3ba];return _0x3794bb;};'use strict';var ChatMessageEvents=require('./chatMessage.events');var events=['save','remove','update'];function createListener(_0x59212c,_0x157c9d){return function(_0x40c20f){_0x157c9d['emit'](_0x59212c,_0x40c20f);};}function removeListener(_0x23ed9e,_0x2ede55){return function(){ChatMessageEvents[_0x1601('0x0')](_0x23ed9e,_0x2ede55);};}exports[_0x1601('0x1')]=function(_0x3c9c29){for(var _0x38cc43=0x0,_0x277bfc=events[_0x1601('0x2')];_0x38cc43<_0x277bfc;_0x38cc43++){var _0x18e06c=events[_0x38cc43];var _0x99dee1=createListener('chatMessage:'+_0x18e06c,_0x3c9c29);ChatMessageEvents['on'](_0x18e06c,_0x99dee1);}};