Built motion from commit (unavailable).|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 _0x817b=['update','emit','length','./notification.events','save','remove'];(function(_0x4c2132,_0x3a77e6){var _0x152466=function(_0x2627a7){while(--_0x2627a7){_0x4c2132['push'](_0x4c2132['shift']());}};_0x152466(++_0x3a77e6);}(_0x817b,0x9f));var _0xb817=function(_0x4320d9,_0x13df51){_0x4320d9=_0x4320d9-0x0;var _0x374bf7=_0x817b[_0x4320d9];return _0x374bf7;};'use strict';var NotificationEvents=require(_0xb817('0x0'));var events=[_0xb817('0x1'),_0xb817('0x2'),_0xb817('0x3')];function createListener(_0x4f652b,_0x1e4da6){return function(_0x210d02){_0x1e4da6[_0xb817('0x4')](_0x4f652b,_0x210d02);};}function removeListener(_0x5d5e83,_0x20cb6a){return function(){NotificationEvents['removeListener'](_0x5d5e83,_0x20cb6a);};}exports['register']=function(_0x24a6f8){for(var _0x31588e=0x0,_0x4cdf69=events[_0xb817('0x5')];_0x31588e<_0x4cdf69;_0x31588e++){var _0x1bb544=events[_0x31588e];var _0x109509=createListener('notification:'+_0x1bb544,_0x24a6f8);NotificationEvents['on'](_0x1bb544,_0x109509);}};