caa671e157cc1cdd4573da12b2b193ae60ec35d7
[motion2.git] / server / api / userVoiceQueueRt / userVoiceQueueRt.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 _0xbcc0=['emit','hasOwnProperty','hook','exports','events','UserVoiceQueueRt','setMaxListeners','update','remove'];(function(_0x52719e,_0x57fa90){var _0xbc77ee=function(_0x1331a9){while(--_0x1331a9){_0x52719e['push'](_0x52719e['shift']());}};_0xbc77ee(++_0x57fa90);}(_0xbcc0,0x163));var _0x0bcc=function(_0x270767,_0x5d83ca){_0x270767=_0x270767-0x0;var _0x1bcadd=_0xbcc0[_0x270767];return _0x1bcadd;};'use strict';var EventEmitter=require(_0x0bcc('0x0'));var UserVoiceQueueRt=require('../../mysqldb')['db'][_0x0bcc('0x1')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x0bcc('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x0bcc('0x3'),'afterDestroy':_0x0bcc('0x4')};function emitEvent(_0x482306){return function(_0x332baf,_0x3d10c3,_0x5b708c){UserVoiceQueueRtEvents[_0x0bcc('0x5')](_0x482306+':'+_0x332baf['id'],_0x332baf);UserVoiceQueueRtEvents[_0x0bcc('0x5')](_0x482306,_0x332baf);_0x5b708c(null);};}for(var e in events){if(events[_0x0bcc('0x6')](e)){var event=events[e];UserVoiceQueueRt[_0x0bcc('0x7')](e,emitEvent(event));}}module[_0x0bcc('0x8')]=UserVoiceQueueRtEvents;