8d78c2f61bdb6263efddf858e92995ce47da2d5c
[motion2.git] / server / api / userNotification / userNotification.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 _0x1dc3=['register','length','userNotification:','./userNotification.events','save','update','emit','removeListener'];(function(_0x59ca71,_0x5a0cc1){var _0x5bc869=function(_0x4ed78f){while(--_0x4ed78f){_0x59ca71['push'](_0x59ca71['shift']());}};_0x5bc869(++_0x5a0cc1);}(_0x1dc3,0x1db));var _0x31dc=function(_0x9cd639,_0x4f5589){_0x9cd639=_0x9cd639-0x0;var _0x3990c0=_0x1dc3[_0x9cd639];return _0x3990c0;};'use strict';var UserNotificationEvents=require(_0x31dc('0x0'));var events=[_0x31dc('0x1'),'remove',_0x31dc('0x2')];function createListener(_0x43b8c8,_0x3c8bd6){return function(_0x4dafa0){_0x3c8bd6[_0x31dc('0x3')](_0x43b8c8,_0x4dafa0);};}function removeListener(_0x25df67,_0x2e560d){return function(){UserNotificationEvents[_0x31dc('0x4')](_0x25df67,_0x2e560d);};}exports[_0x31dc('0x5')]=function(_0x3d5fa4){for(var _0x3f3d83=0x0,_0x547183=events[_0x31dc('0x6')];_0x3f3d83<_0x547183;_0x3f3d83++){var _0x3cf4e7=events[_0x3f3d83];var _0x374fe3=createListener(_0x31dc('0x7')+_0x3cf4e7,_0x3d5fa4);UserNotificationEvents['on'](_0x3cf4e7,_0x374fe3);}};