Built motion from commit (unavailable).|2.5.31
[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 _0x653d=['setMaxListeners','save','update','emit','exports','events','../../mysqldb','SmsQueue'];(function(_0x448903,_0x3d25e7){var _0x3e3752=function(_0x146b84){while(--_0x146b84){_0x448903['push'](_0x448903['shift']());}};_0x3e3752(++_0x3d25e7);}(_0x653d,0xfd));var _0xd653=function(_0x15cd94,_0xd4426b){_0x15cd94=_0x15cd94-0x0;var _0x29c7da=_0x653d[_0x15cd94];return _0x29c7da;};'use strict';var EventEmitter=require(_0xd653('0x0'));var SmsQueue=require(_0xd653('0x1'))['db'][_0xd653('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xd653('0x3')](0x0);var events={'afterCreate':_0xd653('0x4'),'afterUpdate':_0xd653('0x5'),'afterDestroy':'remove'};function emitEvent(_0x174d2d){return function(_0x1b36bd,_0x362f33,_0x1e44ec){SmsQueueEvents[_0xd653('0x6')](_0x174d2d+':'+_0x1b36bd['id'],_0x1b36bd);SmsQueueEvents['emit'](_0x174d2d,_0x1b36bd);_0x1e44ec(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsQueue['hook'](e,emitEvent(event));}}module[_0xd653('0x7')]=SmsQueueEvents;