Built motion from commit db94841.|2.5.3
[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 _0x3b18=['update','emit','register','./notification.events','save'];(function(_0x4a9e4a,_0x585df1){var _0xaa903e=function(_0x4190dd){while(--_0x4190dd){_0x4a9e4a['push'](_0x4a9e4a['shift']());}};_0xaa903e(++_0x585df1);}(_0x3b18,0x99));var _0x83b1=function(_0x53e4ec,_0x1c8c8e){_0x53e4ec=_0x53e4ec-0x0;var _0x4d7b19=_0x3b18[_0x53e4ec];return _0x4d7b19;};'use strict';var NotificationEvents=require(_0x83b1('0x0'));var events=[_0x83b1('0x1'),'remove',_0x83b1('0x2')];function createListener(_0x3a91e8,_0x131d50){return function(_0x2dca9c){_0x131d50[_0x83b1('0x3')](_0x3a91e8,_0x2dca9c);};}function removeListener(_0x4da597,_0x58edf7){return function(){NotificationEvents['removeListener'](_0x4da597,_0x58edf7);};}exports[_0x83b1('0x4')]=function(_0x23ec7f){for(var _0x4de686=0x0,_0x59395e=events['length'];_0x4de686<_0x59395e;_0x4de686++){var _0x58e2fa=events[_0x4de686];var _0x221fdb=createListener('notification:'+_0x58e2fa,_0x23ec7f);NotificationEvents['on'](_0x58e2fa,_0x221fdb);}};