Built motion from commit ded33658aad58fc8de845a8299a9db59a88cc353. Version 3.0.0...
[motion-next.git] / server / components / interaction / service.js
index 26afd38..46b4f8c 100644 (file)
@@ -1 +1 @@
-const a833_0x55a2=['then','unknown','body','whatsapp-interactions','name','../../config/logger','lodash','chat-interactions','stringify','omit','role','../../mysqldb','catch','null','info','upperFirst','error','findOne','html','update','fax-interactions','user','toUpperCase','phone','clone'];(function(_0x19caae,_0x55a296){const _0x579c15=function(_0x19cdcc){while(--_0x19cdcc){_0x19caae['push'](_0x19caae['shift']());}};_0x579c15(++_0x55a296);}(a833_0x55a2,0x17c));const a833_0x579c=function(_0x19caae,_0x55a296){_0x19caae=_0x19caae-0x0;let _0x579c15=a833_0x55a2[_0x19caae];return _0x579c15;};const _0x474d34=a833_0x579c;'use strict';const _=require(_0x474d34('0x1')),db=require(_0x474d34('0x6'))['db'],loggers={'openchannel':require(_0x474d34('0x0'))('openchannel-interactions'),'mail':require(_0x474d34('0x0'))('mail-interactions'),'fax':require(_0x474d34('0x0'))(_0x474d34('0xf')),'sms':require(_0x474d34('0x0'))('sms-interactions'),'chat':require(_0x474d34('0x0'))(_0x474d34('0x2')),'whatsapp':require(_0x474d34('0x0'))(_0x474d34('0x17'))};function getInteractionId(_0x19cdcc,_0x3c41c1,_0x35f8ad){const _0x20d02b=_0x474d34;if(_0x19cdcc&&_0x19cdcc[_[_0x20d02b('0xa')](_0x35f8ad)+'InteractionId'])return _0x19cdcc[_['upperFirst'](_0x35f8ad)+'InteractionId'];else{if(_0x19cdcc&&_0x19cdcc['id'])return _0x19cdcc['id'];else return _0x3c41c1&&_0x3c41c1['id']?_0x3c41c1['id']:_0x20d02b('0x15');}}function log(_0x3d2332,_0x4a29b2,_0x52149e,_0x3cecad,_0x5efd1d,_0x4f9e99){const _0x1cd3d9=_0x474d34;loggers[_0x5efd1d['toLowerCase']()][_0x3d2332]('[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4f9e99[_0x1cd3d9('0x11')](),_0x4a29b2?_0x4a29b2['id']:null,_0x4a29b2?_0x4a29b2[_0x1cd3d9('0x18')]:null,_0x4a29b2?_0x4a29b2[_0x1cd3d9('0x5')]:null,getInteractionId(_0x52149e,_0x3cecad,_0x5efd1d),_0x52149e?JSON[_0x1cd3d9('0x3')](_0x52149e):_0x1cd3d9('0x8'));}function updateUser(_0x219b0e,_0x25ed12,_0x1df272,_0x44cc0f,_0x259e59){const _0x18b30a=_0x474d34;db[_[_0x18b30a('0xa')](_0x44cc0f)+'Interaction'][_0x18b30a('0xc')]({'where':{'id':getInteractionId(_0x25ed12,_0x1df272,_0x44cc0f)}})[_0x18b30a('0x14')](function(_0x43e508){const _0x5a8ac6=_0x18b30a;if(_0x43e508)return _0x43e508[_0x5a8ac6('0xe')]({'UserId':_0x219b0e?_0x219b0e['id']:null});})[_0x18b30a('0x14')](function(_0x38415b){const _0x3b941f=_0x18b30a;_0x38415b&&log(_0x3b941f('0x9'),_0x219b0e,_0x25ed12,_0x1df272,_0x44cc0f,_0x259e59);})[_0x18b30a('0x7')](function(){const _0x556b0b=_0x18b30a;log(_0x556b0b('0xb'),_0x219b0e,_0x25ed12,_0x1df272,_0x44cc0f,_0x259e59);});}exports['tracked']=function(_0x4f5b20,_0x6529e3){return function(_0x4e8b8c,_0x11af12,_0x272301){const _0x33d287=a833_0x579c,_0x69984f=_0x4e8b8c[_0x33d287('0x10')];let _0x48230d={};const _0x4b8ec6=_0x4e8b8c['query'];_0x48230d&&(_0x48230d=_[_0x33d287('0x13')](_0x4e8b8c['body']),_0x48230d=_[_0x33d287('0x4')](_0x48230d,[_0x33d287('0x16'),_0x33d287('0xd'),_0x33d287('0x12'),'fax','mobile'])),updateUser(_0x69984f,_0x48230d,_0x4b8ec6,_0x4f5b20,_0x6529e3),_0x272301(null);};};
\ No newline at end of file
+const a833_0x4030=['phone','fax-interactions','unknown','info','clone','stringify','then','body','mail-interactions','openchannel-interactions','toUpperCase','../../config/logger','whatsapp-interactions','lodash','error','InteractionId','html','chat-interactions','../../mysqldb','sms-interactions','query','user','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','fax','update','catch','upperFirst','Interaction'];(function(_0x1c5df4,_0x403057){const _0x3a8706=function(_0x24411f){while(--_0x24411f){_0x1c5df4['push'](_0x1c5df4['shift']());}};_0x3a8706(++_0x403057);}(a833_0x4030,0x19d));const a833_0x3a87=function(_0x1c5df4,_0x403057){_0x1c5df4=_0x1c5df4-0x0;let _0x3a8706=a833_0x4030[_0x1c5df4];return _0x3a8706;};const _0x4e62c9=a833_0x3a87;'use strict';const _=require(_0x4e62c9('0x14')),db=require(_0x4e62c9('0x19'))['db'],loggers={'openchannel':require('../../config/logger')(_0x4e62c9('0x10')),'mail':require(_0x4e62c9('0x12'))(_0x4e62c9('0xf')),'fax':require(_0x4e62c9('0x12'))(_0x4e62c9('0x8')),'sms':require(_0x4e62c9('0x12'))(_0x4e62c9('0x1a')),'chat':require(_0x4e62c9('0x12'))(_0x4e62c9('0x18')),'whatsapp':require('../../config/logger')(_0x4e62c9('0x13'))};function getInteractionId(_0x24411f,_0x4e1be6,_0x222990){const _0x5bc920=_0x4e62c9;if(_0x24411f&&_0x24411f[_[_0x5bc920('0x5')](_0x222990)+_0x5bc920('0x16')])return _0x24411f[_[_0x5bc920('0x5')](_0x222990)+_0x5bc920('0x16')];else{if(_0x24411f&&_0x24411f['id'])return _0x24411f['id'];else return _0x4e1be6&&_0x4e1be6['id']?_0x4e1be6['id']:_0x5bc920('0x9');}}function log(_0x1ce4d4,_0x4f6126,_0x27ddc1,_0x571c9d,_0x52e139,_0x124f71){const _0x692065=_0x4e62c9;loggers[_0x52e139['toLowerCase']()][_0x1ce4d4](_0x692065('0x1'),_0x124f71[_0x692065('0x11')](),_0x4f6126?_0x4f6126['id']:null,_0x4f6126?_0x4f6126['name']:null,_0x4f6126?_0x4f6126['role']:null,getInteractionId(_0x27ddc1,_0x571c9d,_0x52e139),_0x27ddc1?JSON[_0x692065('0xc')](_0x27ddc1):'null');}function updateUser(_0x1fadb5,_0x578b6d,_0x534e53,_0x2f7e64,_0xfa972f){const _0x4f6c9e=_0x4e62c9;db[_['upperFirst'](_0x2f7e64)+_0x4f6c9e('0x6')]['findOne']({'where':{'id':getInteractionId(_0x578b6d,_0x534e53,_0x2f7e64)}})['then'](function(_0x188afc){const _0x2bde6f=_0x4f6c9e;if(_0x188afc)return _0x188afc[_0x2bde6f('0x3')]({'UserId':_0x1fadb5?_0x1fadb5['id']:null});})[_0x4f6c9e('0xd')](function(_0xbc899){const _0x2dcbde=_0x4f6c9e;_0xbc899&&log(_0x2dcbde('0xa'),_0x1fadb5,_0x578b6d,_0x534e53,_0x2f7e64,_0xfa972f);})[_0x4f6c9e('0x4')](function(){const _0x254f40=_0x4f6c9e;log(_0x254f40('0x15'),_0x1fadb5,_0x578b6d,_0x534e53,_0x2f7e64,_0xfa972f);});}exports['tracked']=function(_0x446c16,_0x3527c1){return function(_0x2eef34,_0x5b92f3,_0xfbab7a){const _0x5eb130=a833_0x3a87,_0x4be47c=_0x2eef34[_0x5eb130('0x0')];let _0x3367aa={};const _0x1f54d0=_0x2eef34[_0x5eb130('0x1b')];_0x3367aa&&(_0x3367aa=_[_0x5eb130('0xb')](_0x2eef34[_0x5eb130('0xe')]),_0x3367aa=_['omit'](_0x3367aa,[_0x5eb130('0xe'),_0x5eb130('0x17'),_0x5eb130('0x7'),_0x5eb130('0x2'),'mobile'])),updateUser(_0x4be47c,_0x3367aa,_0x1f54d0,_0x446c16,_0x3527c1),_0xfbab7a(null);};};
\ No newline at end of file