Built motion from commit (unavailable).|2.5.14
[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 _0x4e15=['register','length','notification:','update','removeListener'];(function(_0xc91338,_0x4cc17b){var _0x2524ba=function(_0x4a21a1){while(--_0x4a21a1){_0xc91338['push'](_0xc91338['shift']());}};_0x2524ba(++_0x4cc17b);}(_0x4e15,0xb7));var _0x54e1=function(_0x41d8cb,_0x35e7d9){_0x41d8cb=_0x41d8cb-0x0;var _0x2684b5=_0x4e15[_0x41d8cb];return _0x2684b5;};'use strict';var NotificationEvents=require('./notification.events');var events=['save','remove',_0x54e1('0x0')];function createListener(_0x202fe1,_0xbab06a){return function(_0x48a49f){_0xbab06a['emit'](_0x202fe1,_0x48a49f);};}function removeListener(_0x3d2e6b,_0x292aef){return function(){NotificationEvents[_0x54e1('0x1')](_0x3d2e6b,_0x292aef);};}exports[_0x54e1('0x2')]=function(_0x500338){for(var _0x432db1=0x0,_0x499a0c=events[_0x54e1('0x3')];_0x432db1<_0x499a0c;_0x432db1++){var _0x156701=events[_0x432db1];var _0x2f3ce6=createListener(_0x54e1('0x4')+_0x156701,_0x500338);NotificationEvents['on'](_0x156701,_0x2f3ce6);}};