Built motion from commit (unavailable).|2.5.15
[motion2.git] / server / api / smsQueue / smsQueue.events.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 _0x1e54=['save','remove','emit','hook','../../mysqldb','SmsQueue'];(function(_0x20908c,_0x2f279f){var _0x30f663=function(_0x577c4e){while(--_0x577c4e){_0x20908c['push'](_0x20908c['shift']());}};_0x30f663(++_0x2f279f);}(_0x1e54,0x1e4));var _0x41e5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1e54[_0x3dd15e];return _0x231fd0;};'use strict';var EventEmitter=require('events');var SmsQueue=require(_0x41e5('0x0'))['db'][_0x41e5('0x1')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x41e5('0x2'),'afterUpdate':'update','afterDestroy':_0x41e5('0x3')};function emitEvent(_0x366369){return function(_0xcb6baa,_0x24c09a,_0x173e47){SmsQueueEvents[_0x41e5('0x4')](_0x366369+':'+_0xcb6baa['id'],_0xcb6baa);SmsQueueEvents[_0x41e5('0x4')](_0x366369,_0xcb6baa);_0x173e47(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue[_0x41e5('0x5')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;