Built motion from commit (unavailable).|2.4.7
[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 _0x9c79=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','SmsQueue'];(function(_0x3bb45b,_0x2dcc0b){var _0x513162=function(_0x46f44b){while(--_0x46f44b){_0x3bb45b['push'](_0x3bb45b['shift']());}};_0x513162(++_0x2dcc0b);}(_0x9c79,0x1d6));var _0x99c7=function(_0x18a436,_0x1dbe06){_0x18a436=_0x18a436-0x0;var _0x5c2cf8=_0x9c79[_0x18a436];return _0x5c2cf8;};'use strict';var EventEmitter=require(_0x99c7('0x0'));var SmsQueue=require(_0x99c7('0x1'))['db'][_0x99c7('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0x99c7('0x3')](0x0);var events={'afterCreate':_0x99c7('0x4'),'afterUpdate':_0x99c7('0x5'),'afterDestroy':_0x99c7('0x6')};function emitEvent(_0x4e064b){return function(_0x1e96e5,_0x17b8e3,_0x3158ed){SmsQueueEvents[_0x99c7('0x7')](_0x4e064b+':'+_0x1e96e5['id'],_0x1e96e5);SmsQueueEvents[_0x99c7('0x7')](_0x4e064b,_0x1e96e5);_0x3158ed(null);};}for(var e in events){if(events[_0x99c7('0x8')](e)){var event=events[e];SmsQueue[_0x99c7('0x9')](e,emitEvent(event));}}module[_0x99c7('0xa')]=SmsQueueEvents;