Built motion from commit 3e059bc2.|2.5.32
[motion2.git] / server / api / faxMessage / faxMessage.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 _0xcfcb=['hook','exports','events','save','update','remove','emit','hasOwnProperty'];(function(_0x17d76b,_0x54345b){var _0x16f3ac=function(_0x315442){while(--_0x315442){_0x17d76b['push'](_0x17d76b['shift']());}};_0x16f3ac(++_0x54345b);}(_0xcfcb,0x7a));var _0xbcfc=function(_0x50f92b,_0x32fab3){_0x50f92b=_0x50f92b-0x0;var _0x5cedbc=_0xcfcb[_0x50f92b];return _0x5cedbc;};'use strict';var EventEmitter=require(_0xbcfc('0x0'));var FaxMessage=require('../../mysqldb')['db']['FaxMessage'];var FaxMessageEvents=new EventEmitter();FaxMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbcfc('0x1'),'afterUpdate':_0xbcfc('0x2'),'afterDestroy':_0xbcfc('0x3')};function emitEvent(_0x16bde0){return function(_0x38bab3,_0x32707d,_0x83687c){FaxMessageEvents[_0xbcfc('0x4')](_0x16bde0+':'+_0x38bab3['id'],_0x38bab3);FaxMessageEvents[_0xbcfc('0x4')](_0x16bde0,_0x38bab3);_0x83687c(null);};}for(var e in events){if(events[_0xbcfc('0x5')](e)){var event=events[e];FaxMessage[_0xbcfc('0x6')](e,emitEvent(event));}}module[_0xbcfc('0x7')]=FaxMessageEvents;