Built motion from commit (unavailable).|2.5.12
[motion2.git] / server / api / notification / notification.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 _0xdfba=['length','save','remove','update','removeListener','register'];(function(_0x4036bc,_0x1cdc5f){var _0x28c354=function(_0x326d34){while(--_0x326d34){_0x4036bc['push'](_0x4036bc['shift']());}};_0x28c354(++_0x1cdc5f);}(_0xdfba,0x1f3));var _0xadfb=function(_0x325e1c,_0x52fb08){_0x325e1c=_0x325e1c-0x0;var _0x149f3f=_0xdfba[_0x325e1c];return _0x149f3f;};'use strict';var NotificationEvents=require('./notification.events');var events=[_0xadfb('0x0'),_0xadfb('0x1'),_0xadfb('0x2')];function createListener(_0x5258fb,_0x184efc){return function(_0x519ce5){_0x184efc['emit'](_0x5258fb,_0x519ce5);};}function removeListener(_0x4c7a8a,_0x452bd3){return function(){NotificationEvents[_0xadfb('0x3')](_0x4c7a8a,_0x452bd3);};}exports[_0xadfb('0x4')]=function(_0x43a983){for(var _0x42fd00=0x0,_0x4323e8=events[_0xadfb('0x5')];_0x42fd00<_0x4323e8;_0x42fd00++){var _0x91a315=events[_0x42fd00];var _0x32842b=createListener('notification:'+_0x91a315,_0x43a983);NotificationEvents['on'](_0x91a315,_0x32842b);}};