Built motion from commit 10af8726.|2.6.34
[motion2.git] / server / api / smsMessage / smsMessage.model.js
index f26dd34..926e040 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x202f=['base64','http_code','data','queued_count','clickSend','plivo','remote','/status?token=','authId','https://api.plivo.com/v1/Account/%s/Message/','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','login','text','sort','apiKey','md5','digest','hex','signature=','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','UTF-8','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','intelepeer','Bearer\x20','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','status','refid','Token\x20not\x20received','finally','utf8mb4_unicode_ci','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','isNil','UserId','SmsInteractionId','SmsInteraction','findOne','then','update','createdAt','catch','error','secret','SmsAccount','find','SmsAccountId','type','twilio','phone','authToken','messages','create','/api/sms/messages/','token','sid','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','smsMethod','sender','login?username=','&password=','GET','sms','POST','user_key','session_key','total_sent','internal_order_id','deliveryReport','read','SmsMessage,\x20%s,\x20%s,\x20%s','inspect','Missing\x20parameters:\x20username,\x20password','senderString','https://smsapi.connectel.se/api/v2/send/','connectel','clicksend','password','xCALLY\x20Motion','%s:%s','format','Basic\x20%s','toString'];(function(_0x4c1ee,_0x35004e){var _0x3b067e=function(_0x51da10){while(--_0x51da10){_0x4c1ee['push'](_0x4c1ee['shift']());}};_0x3b067e(++_0x35004e);}(_0x202f,0x117));var _0xf202=function(_0x41d453,_0x4e3ff7){_0x41d453=_0x41d453-0x0;var _0x323303=_0x202f[_0x41d453];return _0x323303;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xf202('0x0'))(_0xf202('0x1'));var moment=require(_0xf202('0x2'));var BPromise=require(_0xf202('0x3'));var rp=require(_0xf202('0x4'));var fs=require('fs');var path=require(_0xf202('0x5'));var rimraf=require('rimraf');var config=require(_0xf202('0x6'));var attributes=require(_0xf202('0x7'));module[_0xf202('0x8')]=function(_0x1ea0e6,_0x6e02b7){return _0x1ea0e6[_0xf202('0x9')](_0xf202('0xa'),attributes,{'tableName':_0xf202('0xb'),'paranoid':![],'indexes':[{'name':_0xf202('0xc'),'fields':[_0xf202('0xc')]},{'name':_0xf202('0xd'),'fields':[_0xf202('0xe')],'type':_0xf202('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x405155,_0xad0f6f,_0xd6e090){var _0x278d16=_0x1ea0e6[_0xf202('0x10')];var _0x401824=_0x405155[_0xf202('0x11')]({'plain':!![]});if(_0x401824[_0xf202('0x12')][_0xf202('0x13')]()==='in'||_0x401824[_0xf202('0x12')][_0xf202('0x13')]()===_0xf202('0x14')&&!_0x401824['secret']&&!_[_0xf202('0x15')](_0x401824[_0xf202('0x16')])&&!_[_0xf202('0x15')](_0x401824[_0xf202('0x17')])){_0x278d16[_0xf202('0x18')][_0xf202('0x19')]({'where':{'id':_0x401824['SmsInteractionId']}})[_0xf202('0x1a')](function(_0x2d6332){if(_0x2d6332){_0x2d6332[_0xf202('0x1b')]({'lastMsgAt':_0x401824[_0xf202('0x1c')],'lastMsgDirection':_0x401824[_0xf202('0x12')][_0xf202('0x13')]()});}})[_0xf202('0x1d')](function(_0x2a043b){console[_0xf202('0x1e')](_0x2a043b);});}if(_0x401824[_0xf202('0x12')]===_0xf202('0x14')&&!_0x401824[_0xf202('0x1f')]){var _0x496642;_0x278d16[_0xf202('0x20')][_0xf202('0x21')]({'where':{'id':_0x401824[_0xf202('0x22')]},'raw':!![]})[_0xf202('0x1a')](function(_0x1eb339){_0x496642=_0x1eb339;if(_0x496642&&_0x496642[_0xf202('0x23')]){switch(_0x496642[_0xf202('0x23')]){case _0xf202('0x24'):var _0x4e7f6a=require(_0xf202('0x24'));if(_0x496642['accountSid']&&_0x496642['authToken']&&_0x496642[_0xf202('0x25')]){var _0x174450=new _0x4e7f6a(_0x496642['accountSid'],_0x496642[_0xf202('0x26')]);_0x174450[_0xf202('0x27')][_0xf202('0x28')]({'body':_0x401824[_0xf202('0xe')],'to':_0x401824[_0xf202('0x25')],'from':_0x496642[_0xf202('0x25')],'statusCallback':_0x496642['remote']+_0xf202('0x29')+_0x401824['id']+'/status?token='+_0x496642[_0xf202('0x2a')]})['then'](function(_0x3962a5){if(_0x3962a5[_0xf202('0x2b')]){return _0x405155['update']({'messageId':_0x3962a5[_0xf202('0x2b')]});}})[_0xf202('0x1d')](function(_0x1a2888){logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x24'),util['inspect'](_0x1a2888,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x24'),_0xf202('0x2d'));}break;case _0xf202('0x2e'):var _0x2afc38=_0xf202('0x2f');if(_0x496642[_0xf202('0x30')]&&_0x496642['password']){var _0x106fc5={'recipient':[_0x401824[_0xf202('0x25')]],'message':_0x401824[_0xf202('0xe')],'message_type':_0x496642[_0xf202('0x31')]};if(_0x496642[_0xf202('0x31')]&&_0x496642[_0xf202('0x31')]!=='SI'){_0x106fc5[_0xf202('0x32')]=_0x496642['phone'];}var _0x6a299a={'url':_0x2afc38+_0xf202('0x33')+_0x496642[_0xf202('0x30')]+_0xf202('0x34')+_0x496642['password'],'method':_0xf202('0x35')};rp(_0x6a299a)['then'](function(_0x42c614){var _0x2394cb=_0x42c614['split'](';');var _0x2cefff={'user_key':_0x2394cb[0x0],'session_key':_0x2394cb[0x1]};_0x6a299a={'url':_0x2afc38+_0xf202('0x36'),'method':_0xf202('0x37'),'headers':{'user_key':_0x2cefff[_0xf202('0x38')],'Session_key':_0x2cefff[_0xf202('0x39')]},'json':!![],'body':_0x106fc5};return rp(_0x6a299a);})['then'](function(_0x333ef0){if(_0x333ef0[_0xf202('0x3a')]>=0x1){var _0x50aa6f={'messageId':_0x333ef0[_0xf202('0x3b')]};if(_0x496642[_0xf202('0x31')]!=='GP'||!_0x496642[_0xf202('0x3c')]){_0x50aa6f[_0xf202('0x3d')]=!![];}return _0x405155['update'](_0x50aa6f);}else{return logger[_0xf202('0x1e')](_0xf202('0x3e'),'afterCreate',_0xf202('0x2e'),util['inspect'](_0x333ef0,{'showHidden':![],'depth':null}));}})[_0xf202('0x1d')](function(_0x215318){return logger[_0xf202('0x1e')](_0xf202('0x3e'),'afterCreate',_0xf202('0x2e'),util[_0xf202('0x3f')](_0x215318,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')](_0xf202('0x3e'),'afterCreate',_0xf202('0x2e'),_0xf202('0x40'));}break;case'connectel':if(_0x496642['authToken']){var _0x3a05ed={'recipient':_0x401824[_0xf202('0x25')],'message':_0x401824[_0xf202('0xe')],'sender':_0x496642[_0xf202('0x41')]||_0x496642[_0xf202('0x25')],'authorization':_0x496642[_0xf202('0x26')]};var _0xad0f6f={'method':_0xf202('0x37'),'uri':_0xf202('0x42'),'body':_0x3a05ed,'json':!![]};rp(_0xad0f6f)['then'](function(_0x5b924c){var _0x240baa={'messageId':_0x5b924c['requestid']};if(!_0x496642[_0xf202('0x3c')]){_0x240baa[_0xf202('0x3d')]=!![];}return _0x405155[_0xf202('0x1b')](_0x240baa);})['catch'](function(_0x668508){logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x43'),util[_0xf202('0x3f')](_0x668508,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x43'),'Missing\x20parameters:\x20authToken');}break;case _0xf202('0x44'):if(_0x496642[_0xf202('0x30')]&&_0x496642[_0xf202('0x45')]){var _0x3a05ed={'messages':[{'source':_0xf202('0x46'),'to':_0x401824['phone'],'body':_0x401824[_0xf202('0xe')],'from':_0x496642[_0xf202('0x41')]||_0x496642[_0xf202('0x25')]}]};var _0x3c337c=util['format'](_0xf202('0x47'),_0x496642[_0xf202('0x30')],_0x496642[_0xf202('0x45')]);var _0xad0f6f={'method':'POST','uri':'https://rest.clicksend.com/v3/sms/send','body':_0x3a05ed,'headers':{'Authorization':util[_0xf202('0x48')](_0xf202('0x49'),new Buffer(_0x3c337c)[_0xf202('0x4a')](_0xf202('0x4b')))},'json':!![]};rp(_0xad0f6f)['then'](function(_0x42b3fb){if(_0x42b3fb[_0xf202('0x4c')]>=0xc8&&_0x42b3fb['http_code']<=0xce){if(_0x42b3fb[_0xf202('0x4d')]&&_0x42b3fb[_0xf202('0x4d')][_0xf202('0x4e')]>0x0){var _0x49e95c=_['head'](_0x42b3fb[_0xf202('0x4d')][_0xf202('0x27')]);var _0x2372a9={'messageId':_0x49e95c['message_id']};if(!_0x496642['deliveryReport']){_0x2372a9[_0xf202('0x3d')]=!![];}return _0x405155['update'](_0x2372a9);}else{logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),'clickSend',util[_0xf202('0x3f')](_0x42b3fb,{'showHidden':![],'depth':null}));}}else{logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x4f'),util[_0xf202('0x3f')](_0x42b3fb,{'showHidden':![],'depth':null}));}})['catch'](function(_0x35022f){logger['error'](_0xf202('0x3e'),'afterCreate','clickSend',util[_0xf202('0x3f')](_0x35022f,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x4f'),'Missing\x20parameters:\x20username,\x20password');}break;case _0xf202('0x50'):if(_0x496642['authId']&&_0x496642[_0xf202('0x26')]){var _0x3a05ed={'dst':_0x401824[_0xf202('0x25')],'text':_0x401824[_0xf202('0xe')],'src':_0x496642['senderString']||_0x496642[_0xf202('0x25')],'url':_0x496642[_0xf202('0x51')]+_0xf202('0x29')+_0x401824['id']+_0xf202('0x52')+_0x496642[_0xf202('0x2a')]};var _0x3c337c=util[_0xf202('0x48')](_0xf202('0x47'),_0x496642[_0xf202('0x53')],_0x496642[_0xf202('0x26')]);var _0xad0f6f={'method':_0xf202('0x37'),'uri':util[_0xf202('0x48')](_0xf202('0x54'),_0x496642[_0xf202('0x53')]),'body':_0x3a05ed,'headers':{'Authorization':util['format']('Basic\x20%s',new Buffer(_0x3c337c)[_0xf202('0x4a')]('base64'))},'json':!![]};rp(_0xad0f6f)['then'](function(_0x23e0ed){var _0x120244={'messageId':_0x23e0ed['message_uuid'][0x0]};return _0x405155[_0xf202('0x1b')](_0x120244);})[_0xf202('0x1d')](function(_0xebd86b){logger['error'](_0xf202('0x3e'),'afterCreate',_0xf202('0x50'),util[_0xf202('0x3f')](_0xebd86b,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x50'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case _0xf202('0x55'):if(_0x496642[_0xf202('0x30')]&&_0x496642[_0xf202('0x45')]){if(_0x496642['baseUrl']){var _0x3dfcf3={'method':'POST','uri':_0x496642[_0xf202('0x56')]+_0xf202('0x57'),'body':{'username':_0x496642['username'],'password':_0x496642[_0xf202('0x45')]},'json':!![]};return rp(_0x3dfcf3)[_0xf202('0x1a')](function(_0x419443){var _0x3af54b={'method':_0xf202('0x37'),'uri':_0x496642[_0xf202('0x56')]+_0xf202('0x58'),'body':{'messages':[{'from':_0x496642['phone'],'destinations':[{'to':_0x401824[_0xf202('0x25')]}],'text':_0x401824['body'],'notifyUrl':_0x496642[_0xf202('0x51')]+_0xf202('0x29')+_0x401824['id']+_0xf202('0x52')+_0x496642[_0xf202('0x2a')],'notifyContentType':_0xf202('0x59'),'callbackData':_0x496642[_0xf202('0x25')]+';'+_0x401824['body']}]},'headers':{'Authorization':_0xf202('0x5a')+_0x419443[_0xf202('0x2a')]},'json':!![]};return rp(_0x3af54b)[_0xf202('0x1a')](function(_0x33ee0e){if(_0x33ee0e[_0xf202('0x27')]){var _0x35fc3c={'messageId':_0x33ee0e[_0xf202('0x27')][0x0][_0xf202('0xc')]};if(!_0x496642[_0xf202('0x3c')]){_0x35fc3c[_0xf202('0x3d')]=!![];}return _0x405155['update'](_0x35fc3c);}else{return logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),'infobip',util[_0xf202('0x3f')](_0x33ee0e,{'showHidden':![],'depth':null}));}});})[_0xf202('0x1d')](function(_0x33401a){return logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','infobip',util[_0xf202('0x3f')](_0x33401a,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x55'),_0xf202('0x5b'));}}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x55'),_0xf202('0x40'));}break;case _0xf202('0x5c'):var _0x26830c=require('crypto');if(_0x496642['apiKey']){var _0x10ab24={};_0x10ab24[_0xf202('0x5d')]=_0x496642['username'];_0x10ab24['phone']=_0x401824[_0xf202('0x25')];_0x10ab24['sender']=_0x496642['phone'];_0x10ab24[_0xf202('0x5e')]=_0x401824[_0xf202('0xe')];_0x10ab24['timestamp']=+new Date();var _0x18af14='';var _0x348394='';var _0x22d8d2=Object['keys'](_0x10ab24);_0x22d8d2[_0xf202('0x5f')]();for(var _0x4ccaa7=0x0;_0x4ccaa7<_0x22d8d2['length'];_0x4ccaa7++){if(_0x18af14!=''){_0x18af14+='&';}_0x18af14+=_0x22d8d2[_0x4ccaa7]+'='+encodeURIComponent(_0x10ab24[_0x22d8d2[_0x4ccaa7]]);_0x348394+=_0x10ab24[_0x22d8d2[_0x4ccaa7]];}_0x348394+=_0x496642[_0xf202('0x60')];_0x348394=_0x26830c['createHash'](_0xf202('0x61'))[_0xf202('0x1b')](_0x348394)[_0xf202('0x62')](_0xf202('0x63'));if(_0x18af14!==''){_0x18af14+='&';}_0x18af14+=_0xf202('0x64')+_0x348394;var _0x6a299a={'method':_0xf202('0x35'),'uri':_0x496642[_0xf202('0x56')]+'/external/get/send.php?'+_0x18af14,'json':!![]};return rp(_0x6a299a)['then'](function(_0x18deb0){var _0x41b040=Object['keys'](_0x18deb0);if(_0x18deb0[_0x41b040[0x0]][_0xf202('0x1e')]&&parseInt(_0x18deb0[_0x41b040[0x0]]['error'])===0x0){var _0xc0caf4={'messageId':_0x18deb0[_0x41b040[0x0]]['id_sms']};if(!_0x496642[_0xf202('0x3c')]){_0xc0caf4[_0xf202('0x3d')]=!![];}return _0x405155[_0xf202('0x1b')](_0xc0caf4);}else{return logger['error'](_0xf202('0x3e'),'afterCreate',_0xf202('0x5c'),util[_0xf202('0x3f')](_0x18deb0[_0xf202('0x1e')],{'showHidden':![],'depth':null}));}})[_0xf202('0x1d')](function(_0x12f226){return logger['error'](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x5c'),util[_0xf202('0x3f')](_0x12f226,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),'csc',_0xf202('0x65'));}break;case _0xf202('0x66'):if(_0x496642['apiKey']){var _0x2a7e39={'method':_0xf202('0x37'),'uri':_0xf202('0x67'),'headers':{'Authorization':_0x496642[_0xf202('0x60')]},'body':{'content':_0x401824[_0xf202('0xe')],'to':[_0x401824[_0xf202('0x25')]],'from':_0x496642['phone'],'binary':![],'clientMessageId':'uuid','charset':_0xf202('0x68')},'json':!![]};rp(_0x2a7e39)[_0xf202('0x1a')](function(_0x37f6ad){if(!_0x37f6ad[_0xf202('0x1e')]){var _0x2f12b2={'messageId':_0x37f6ad[_0xf202('0x27')][0x0]['apiMessageId']};if(!_0x496642['deliveryReport']){_0x2f12b2[_0xf202('0x3d')]=!![];}return _0x405155[_0xf202('0x1b')](_0x2f12b2);}else{return logger['error'](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x66'),util[_0xf202('0x3f')](_0x37f6ad['error'],{'showHidden':![],'depth':null}));}})[_0xf202('0x1d')](function(_0xb475b){return logger['error'](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x66'),util['inspect'](_0xb475b,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xf202('0x3e'),'afterCreate',_0xf202('0x66'),_0xf202('0x65'));}break;case _0xf202('0x69'):if(_0x496642['username']&&_0x496642[_0xf202('0x45')]){var _0x3c337c=util[_0xf202('0x48')](_0xf202('0x47'),_0x496642['username'],_0x496642['password']);var _0xad0f6f={'method':_0xf202('0x37'),'uri':_0xf202('0x6a')+_0x496642[_0xf202('0x6b')]+'/messages','body':{'to':[_0x401824[_0xf202('0x25')]],'text':_0x401824['body'],'from':_0x496642['phone'],'applicationId':_0x496642['applicationId']},'headers':{'Authorization':util['format'](_0xf202('0x49'),new Buffer(_0x3c337c)[_0xf202('0x4a')](_0xf202('0x4b')))},'json':!![]};rp(_0xad0f6f)[_0xf202('0x1a')](function(_0xb676d0){if(_0xb676d0['id']){var _0x411596={'messageId':_0xb676d0['id']};return _0x405155[_0xf202('0x1b')](_0x411596);}else{logger[_0xf202('0x1e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xf202('0x2c'),_0xf202('0x69'),util[_0xf202('0x3f')](_0xb676d0,{'showHidden':![],'depth':null}));}})['catch'](function(_0x21f34d){logger['error'](_0xf202('0x3e'),_0xf202('0x2c'),'bandwidth',util[_0xf202('0x3f')](_0x21f34d,{'showHidden':![],'depth':null}));});}else{logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x69'),_0xf202('0x40'));}break;case _0xf202('0x6c'):if(_0x496642[_0xf202('0x60')]){var _0x5d5c72={};var _0x6a299a={'method':_0xf202('0x37'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0xf202('0x6d')+_0x496642[_0xf202('0x60')],'Content-Type':_0xf202('0x59')},'body':{'from':_0x496642[_0xf202('0x25')],'to':_0x401824['phone'],'text':_0x401824[_0xf202('0xe')]},'json':!![]};return rp(_0x6a299a)['then'](function(_0x24959a){if(_0x24959a[_0xf202('0x6e')]==0xca){_0x5d5c72[_0xf202('0x6f')]=_0x24959a;var _0x486289={'method':_0xf202('0x37'),'uri':_0xf202('0x70'),'headers':{'Authorization':_0xf202('0x6d')+_0x496642[_0xf202('0x60')],'Content-Type':_0xf202('0x59')},'body':{'refid':_0x5d5c72[_0xf202('0x6f')]['refid']},'json':!![]};return rp(_0x486289)[_0xf202('0x1a')](function(_0x3f5a9f){_0x5d5c72[_0xf202('0x71')]=_0x3f5a9f;var _0x150b4d={'messageId':_0x5d5c72[_0xf202('0x6f')][_0xf202('0x72')],'read':!![]};return _0x405155[_0xf202('0x1b')](_0x150b4d);});}else{return logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),_0xf202('0x6c'),util[_0xf202('0x3f')](_0x24959a,{'showHidden':![],'depth':null}));}})[_0xf202('0x1d')](function(_0x53eb95){return logger[_0xf202('0x1e')](_0xf202('0x3e'),_0xf202('0x2c'),'intelepeer',util[_0xf202('0x3f')](_0x53eb95,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0xf202('0x3e'),'afterCreate',_0xf202('0x6c'),_0xf202('0x73'));}break;}}})[_0xf202('0x74')](function(){_0xd6e090();});}else{_0xd6e090();}}},'charset':'utf8mb4','collate':_0xf202('0x75')});};
\ No newline at end of file
+var _0x63dc=['requestid','deliveryReport','connectel','Missing\x20parameters:\x20authToken','clicksend','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','http_code','data','queued_count','head','clickSend','authId','/api/sms/messages/','https://api.plivo.com/v1/Account/%s/Message/','base64','message_uuid','plivo','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','timestamp','keys','sort','length','digest','signature=','id_sms','Missing\x20parameters:\x20apiKey','clickatell','uuid','UTF-8','apiMessageId','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','bandwidth','intelepeer','Bearer\x20','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','message','refid','status','utf8mb4','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','models','direction','toLowerCase','secret','isNil','UserId','SmsInteractionId','SmsInteraction','then','update','createdAt','error','out','SmsAccount','find','type','twilio','accountSid','authToken','phone','messages','create','remote','/status?token=','token','sid','catch','afterCreate','SmsMessage,\x20%s,\x20%s,\x20%s','skebby','https://api.skebby.it/API/v1.0/REST/','password','smsMethod','username','GET','split','sms','user_key','session_key','total_sent','internal_order_id','read','inspect','Missing\x20parameters:\x20username,\x20password','senderString','POST','https://smsapi.connectel.se/api/v2/send/'];(function(_0x4ce637,_0x463346){var _0x2e9cba=function(_0x11f3d1){while(--_0x11f3d1){_0x4ce637['push'](_0x4ce637['shift']());}};_0x2e9cba(++_0x463346);}(_0x63dc,0xae));var _0xc63d=function(_0x118487,_0x3a111a){_0x118487=_0x118487-0x0;var _0x1492e7=_0x63dc[_0x118487];return _0x1492e7;};'use strict';var _=require('lodash');var util=require(_0xc63d('0x0'));var logger=require(_0xc63d('0x1'))(_0xc63d('0x2'));var moment=require(_0xc63d('0x3'));var BPromise=require('bluebird');var rp=require(_0xc63d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc63d('0x5'));var config=require(_0xc63d('0x6'));var attributes=require(_0xc63d('0x7'));module[_0xc63d('0x8')]=function(_0x407600,_0x2e643f){return _0x407600[_0xc63d('0x9')](_0xc63d('0xa'),attributes,{'tableName':_0xc63d('0xb'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0xc63d('0xc')]},{'name':_0xc63d('0xd'),'fields':[_0xc63d('0xe')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x1c9e40,_0x4efa55,_0x467114){var _0x3231f6=_0x407600[_0xc63d('0xf')];var _0x5114ea=_0x1c9e40['get']({'plain':!![]});if(_0x5114ea[_0xc63d('0x10')][_0xc63d('0x11')]()==='in'||_0x5114ea[_0xc63d('0x10')][_0xc63d('0x11')]()==='out'&&!_0x5114ea[_0xc63d('0x12')]&&!_[_0xc63d('0x13')](_0x5114ea[_0xc63d('0x14')])&&!_['isNil'](_0x5114ea[_0xc63d('0x15')])){_0x3231f6[_0xc63d('0x16')]['findOne']({'where':{'id':_0x5114ea['SmsInteractionId']}})[_0xc63d('0x17')](function(_0x541369){if(_0x541369){_0x541369[_0xc63d('0x18')]({'lastMsgAt':_0x5114ea[_0xc63d('0x19')],'lastMsgDirection':_0x5114ea[_0xc63d('0x10')][_0xc63d('0x11')]()});}})['catch'](function(_0x28b7ca){console[_0xc63d('0x1a')](_0x28b7ca);});}if(_0x5114ea[_0xc63d('0x10')]===_0xc63d('0x1b')&&!_0x5114ea['secret']){var _0x830ff8;_0x3231f6[_0xc63d('0x1c')][_0xc63d('0x1d')]({'where':{'id':_0x5114ea['SmsAccountId']},'raw':!![]})[_0xc63d('0x17')](function(_0x1d782f){_0x830ff8=_0x1d782f;if(_0x830ff8&&_0x830ff8[_0xc63d('0x1e')]){switch(_0x830ff8[_0xc63d('0x1e')]){case _0xc63d('0x1f'):var _0x3e12a4=require(_0xc63d('0x1f'));if(_0x830ff8[_0xc63d('0x20')]&&_0x830ff8[_0xc63d('0x21')]&&_0x830ff8[_0xc63d('0x22')]){var _0x175500=new _0x3e12a4(_0x830ff8[_0xc63d('0x20')],_0x830ff8['authToken']);_0x175500[_0xc63d('0x23')][_0xc63d('0x24')]({'body':_0x5114ea[_0xc63d('0xe')],'to':_0x5114ea['phone'],'from':_0x830ff8[_0xc63d('0x22')],'statusCallback':_0x830ff8[_0xc63d('0x25')]+'/api/sms/messages/'+_0x5114ea['id']+_0xc63d('0x26')+_0x830ff8[_0xc63d('0x27')]})[_0xc63d('0x17')](function(_0x174ef2){if(_0x174ef2[_0xc63d('0x28')]){return _0x1c9e40[_0xc63d('0x18')]({'messageId':_0x174ef2[_0xc63d('0x28')]});}})[_0xc63d('0x29')](function(_0x3f3ad0){logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x1f'),util['inspect'](_0x3f3ad0,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),'afterCreate',_0xc63d('0x1f'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0xc63d('0x2c'):var _0x1806ce=_0xc63d('0x2d');if(_0x830ff8['username']&&_0x830ff8[_0xc63d('0x2e')]){var _0x5280be={'recipient':[_0x5114ea[_0xc63d('0x22')]],'message':_0x5114ea[_0xc63d('0xe')],'message_type':_0x830ff8[_0xc63d('0x2f')]};if(_0x830ff8[_0xc63d('0x2f')]&&_0x830ff8[_0xc63d('0x2f')]!=='SI'){_0x5280be['sender']=_0x830ff8[_0xc63d('0x22')];}var _0x4f1cd2={'url':_0x1806ce+'login?username='+_0x830ff8[_0xc63d('0x30')]+'&password='+_0x830ff8[_0xc63d('0x2e')],'method':_0xc63d('0x31')};rp(_0x4f1cd2)[_0xc63d('0x17')](function(_0x50b343){var _0x391902=_0x50b343[_0xc63d('0x32')](';');var _0xbc3edc={'user_key':_0x391902[0x0],'session_key':_0x391902[0x1]};_0x4f1cd2={'url':_0x1806ce+_0xc63d('0x33'),'method':'POST','headers':{'user_key':_0xbc3edc[_0xc63d('0x34')],'Session_key':_0xbc3edc[_0xc63d('0x35')]},'json':!![],'body':_0x5280be};return rp(_0x4f1cd2);})[_0xc63d('0x17')](function(_0x4ff39b){if(_0x4ff39b[_0xc63d('0x36')]>=0x1){var _0x5e3095={'messageId':_0x4ff39b[_0xc63d('0x37')]};if(_0x830ff8[_0xc63d('0x2f')]!=='GP'||!_0x830ff8['deliveryReport']){_0x5e3095[_0xc63d('0x38')]=!![];}return _0x1c9e40[_0xc63d('0x18')](_0x5e3095);}else{return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x2c'),util['inspect'](_0x4ff39b,{'showHidden':![],'depth':null}));}})[_0xc63d('0x29')](function(_0x3e96ae){return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x2c'),util[_0xc63d('0x39')](_0x3e96ae,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x2c'),_0xc63d('0x3a'));}break;case'connectel':if(_0x830ff8[_0xc63d('0x21')]){var _0xb7d0fe={'recipient':_0x5114ea[_0xc63d('0x22')],'message':_0x5114ea[_0xc63d('0xe')],'sender':_0x830ff8[_0xc63d('0x3b')]||_0x830ff8[_0xc63d('0x22')],'authorization':_0x830ff8[_0xc63d('0x21')]};var _0x4efa55={'method':_0xc63d('0x3c'),'uri':_0xc63d('0x3d'),'body':_0xb7d0fe,'json':!![]};rp(_0x4efa55)[_0xc63d('0x17')](function(_0x229974){var _0x5ec30d={'messageId':_0x229974[_0xc63d('0x3e')]};if(!_0x830ff8[_0xc63d('0x3f')]){_0x5ec30d[_0xc63d('0x38')]=!![];}return _0x1c9e40[_0xc63d('0x18')](_0x5ec30d);})[_0xc63d('0x29')](function(_0x4f9508){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x40'),util['inspect'](_0x4f9508,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x40'),_0xc63d('0x41'));}break;case _0xc63d('0x42'):if(_0x830ff8[_0xc63d('0x30')]&&_0x830ff8[_0xc63d('0x2e')]){var _0xb7d0fe={'messages':[{'source':'xCALLY\x20Motion','to':_0x5114ea['phone'],'body':_0x5114ea['body'],'from':_0x830ff8[_0xc63d('0x3b')]||_0x830ff8[_0xc63d('0x22')]}]};var _0x38483e=util[_0xc63d('0x43')](_0xc63d('0x44'),_0x830ff8[_0xc63d('0x30')],_0x830ff8[_0xc63d('0x2e')]);var _0x4efa55={'method':_0xc63d('0x3c'),'uri':_0xc63d('0x45'),'body':_0xb7d0fe,'headers':{'Authorization':util[_0xc63d('0x43')](_0xc63d('0x46'),new Buffer(_0x38483e)[_0xc63d('0x47')]('base64'))},'json':!![]};rp(_0x4efa55)[_0xc63d('0x17')](function(_0x3c13f7){if(_0x3c13f7[_0xc63d('0x48')]>=0xc8&&_0x3c13f7[_0xc63d('0x48')]<=0xce){if(_0x3c13f7[_0xc63d('0x49')]&&_0x3c13f7['data'][_0xc63d('0x4a')]>0x0){var _0x2a45f4=_[_0xc63d('0x4b')](_0x3c13f7[_0xc63d('0x49')]['messages']);var _0x15454a={'messageId':_0x2a45f4['message_id']};if(!_0x830ff8[_0xc63d('0x3f')]){_0x15454a[_0xc63d('0x38')]=!![];}return _0x1c9e40[_0xc63d('0x18')](_0x15454a);}else{logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x4c'),util[_0xc63d('0x39')](_0x3c13f7,{'showHidden':![],'depth':null}));}}else{logger['error'](_0xc63d('0x2b'),_0xc63d('0x2a'),'clickSend',util[_0xc63d('0x39')](_0x3c13f7,{'showHidden':![],'depth':null}));}})['catch'](function(_0x494bff){logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x4c'),util[_0xc63d('0x39')](_0x494bff,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x4c'),_0xc63d('0x3a'));}break;case'plivo':if(_0x830ff8[_0xc63d('0x4d')]&&_0x830ff8[_0xc63d('0x21')]){var _0xb7d0fe={'dst':_0x5114ea[_0xc63d('0x22')],'text':_0x5114ea[_0xc63d('0xe')],'src':_0x830ff8[_0xc63d('0x3b')]||_0x830ff8[_0xc63d('0x22')],'url':_0x830ff8[_0xc63d('0x25')]+_0xc63d('0x4e')+_0x5114ea['id']+'/status?token='+_0x830ff8[_0xc63d('0x27')]};var _0x38483e=util[_0xc63d('0x43')]('%s:%s',_0x830ff8['authId'],_0x830ff8[_0xc63d('0x21')]);var _0x4efa55={'method':_0xc63d('0x3c'),'uri':util[_0xc63d('0x43')](_0xc63d('0x4f'),_0x830ff8[_0xc63d('0x4d')]),'body':_0xb7d0fe,'headers':{'Authorization':util[_0xc63d('0x43')](_0xc63d('0x46'),new Buffer(_0x38483e)[_0xc63d('0x47')](_0xc63d('0x50')))},'json':!![]};rp(_0x4efa55)[_0xc63d('0x17')](function(_0x5d7464){var _0x528ef9={'messageId':_0x5d7464[_0xc63d('0x51')][0x0]};return _0x1c9e40[_0xc63d('0x18')](_0x528ef9);})['catch'](function(_0xb4680f){logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x52'),util['inspect'](_0xb4680f,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x52'),_0xc63d('0x53'));}break;case _0xc63d('0x54'):if(_0x830ff8[_0xc63d('0x30')]&&_0x830ff8[_0xc63d('0x2e')]){if(_0x830ff8[_0xc63d('0x55')]){var _0x884772={'method':_0xc63d('0x3c'),'uri':_0x830ff8[_0xc63d('0x55')]+'/auth/1/session','body':{'username':_0x830ff8['username'],'password':_0x830ff8[_0xc63d('0x2e')]},'json':!![]};return rp(_0x884772)[_0xc63d('0x17')](function(_0x524286){var _0x2998d3={'method':_0xc63d('0x3c'),'uri':_0x830ff8[_0xc63d('0x55')]+'/sms/2/text/advanced','body':{'messages':[{'from':_0x830ff8[_0xc63d('0x22')],'destinations':[{'to':_0x5114ea['phone']}],'text':_0x5114ea['body'],'notifyUrl':_0x830ff8[_0xc63d('0x25')]+_0xc63d('0x4e')+_0x5114ea['id']+'/status?token='+_0x830ff8[_0xc63d('0x27')],'notifyContentType':_0xc63d('0x56'),'callbackData':_0x830ff8[_0xc63d('0x22')]+';'+_0x5114ea[_0xc63d('0xe')]}]},'headers':{'Authorization':_0xc63d('0x57')+_0x524286[_0xc63d('0x27')]},'json':!![]};return rp(_0x2998d3)[_0xc63d('0x17')](function(_0x48803d){if(_0x48803d[_0xc63d('0x23')]){var _0x227673={'messageId':_0x48803d[_0xc63d('0x23')][0x0][_0xc63d('0xc')]};if(!_0x830ff8['deliveryReport']){_0x227673[_0xc63d('0x38')]=!![];}return _0x1c9e40['update'](_0x227673);}else{return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x54'),util['inspect'](_0x48803d,{'showHidden':![],'depth':null}));}});})[_0xc63d('0x29')](function(_0x26afdc){return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x54'),util['inspect'](_0x26afdc,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x54'),_0xc63d('0x58'));}}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),'afterCreate',_0xc63d('0x54'),'Missing\x20parameters:\x20username,\x20password');}break;case _0xc63d('0x59'):var _0xeb7726=require(_0xc63d('0x5a'));if(_0x830ff8[_0xc63d('0x5b')]){var _0xbae110={};_0xbae110[_0xc63d('0x5c')]=_0x830ff8[_0xc63d('0x30')];_0xbae110[_0xc63d('0x22')]=_0x5114ea[_0xc63d('0x22')];_0xbae110['sender']=_0x830ff8[_0xc63d('0x22')];_0xbae110[_0xc63d('0x5d')]=_0x5114ea[_0xc63d('0xe')];_0xbae110[_0xc63d('0x5e')]=+new Date();var _0x5666f0='';var _0x5e686d='';var _0x538ea2=Object[_0xc63d('0x5f')](_0xbae110);_0x538ea2[_0xc63d('0x60')]();for(var _0x3093a6=0x0;_0x3093a6<_0x538ea2[_0xc63d('0x61')];_0x3093a6++){if(_0x5666f0!=''){_0x5666f0+='&';}_0x5666f0+=_0x538ea2[_0x3093a6]+'='+encodeURIComponent(_0xbae110[_0x538ea2[_0x3093a6]]);_0x5e686d+=_0xbae110[_0x538ea2[_0x3093a6]];}_0x5e686d+=_0x830ff8[_0xc63d('0x5b')];_0x5e686d=_0xeb7726['createHash']('md5')['update'](_0x5e686d)[_0xc63d('0x62')]('hex');if(_0x5666f0!==''){_0x5666f0+='&';}_0x5666f0+=_0xc63d('0x63')+_0x5e686d;var _0x4f1cd2={'method':_0xc63d('0x31'),'uri':_0x830ff8[_0xc63d('0x55')]+'/external/get/send.php?'+_0x5666f0,'json':!![]};return rp(_0x4f1cd2)[_0xc63d('0x17')](function(_0x275b23){var _0x3d5296=Object['keys'](_0x275b23);if(_0x275b23[_0x3d5296[0x0]]['error']&&parseInt(_0x275b23[_0x3d5296[0x0]][_0xc63d('0x1a')])===0x0){var _0x3d7023={'messageId':_0x275b23[_0x3d5296[0x0]][_0xc63d('0x64')]};if(!_0x830ff8['deliveryReport']){_0x3d7023[_0xc63d('0x38')]=!![];}return _0x1c9e40[_0xc63d('0x18')](_0x3d7023);}else{return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x59'),util['inspect'](_0x275b23[_0xc63d('0x1a')],{'showHidden':![],'depth':null}));}})[_0xc63d('0x29')](function(_0x3f2189){return logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x59'),util['inspect'](_0x3f2189,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x59'),_0xc63d('0x65'));}break;case _0xc63d('0x66'):if(_0x830ff8['apiKey']){var _0x37865b={'method':_0xc63d('0x3c'),'uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x830ff8[_0xc63d('0x5b')]},'body':{'content':_0x5114ea[_0xc63d('0xe')],'to':[_0x5114ea[_0xc63d('0x22')]],'from':_0x830ff8['phone'],'binary':![],'clientMessageId':_0xc63d('0x67'),'charset':_0xc63d('0x68')},'json':!![]};rp(_0x37865b)['then'](function(_0x1829ac){if(!_0x1829ac[_0xc63d('0x1a')]){var _0x50caf1={'messageId':_0x1829ac[_0xc63d('0x23')][0x0][_0xc63d('0x69')]};if(!_0x830ff8['deliveryReport']){_0x50caf1[_0xc63d('0x38')]=!![];}return _0x1c9e40[_0xc63d('0x18')](_0x50caf1);}else{return logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x66'),util[_0xc63d('0x39')](_0x1829ac[_0xc63d('0x1a')],{'showHidden':![],'depth':null}));}})[_0xc63d('0x29')](function(_0x202e51){return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x66'),util[_0xc63d('0x39')](_0x202e51,{'showHidden':![],'depth':null}));});}else{logger[_0xc63d('0x1a')](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x66'),_0xc63d('0x65'));}break;case'bandwidth':if(_0x830ff8[_0xc63d('0x30')]&&_0x830ff8[_0xc63d('0x2e')]){var _0x38483e=util[_0xc63d('0x43')]('%s:%s',_0x830ff8[_0xc63d('0x30')],_0x830ff8[_0xc63d('0x2e')]);var _0x4efa55={'method':'POST','uri':_0xc63d('0x6a')+_0x830ff8[_0xc63d('0x6b')]+_0xc63d('0x6c'),'body':{'to':[_0x5114ea['phone']],'text':_0x5114ea[_0xc63d('0xe')],'from':_0x830ff8[_0xc63d('0x22')],'applicationId':_0x830ff8['applicationId']},'headers':{'Authorization':util[_0xc63d('0x43')](_0xc63d('0x46'),new Buffer(_0x38483e)[_0xc63d('0x47')](_0xc63d('0x50')))},'json':!![]};rp(_0x4efa55)[_0xc63d('0x17')](function(_0x28e17d){if(_0x28e17d['id']){var _0x1ae242={'messageId':_0x28e17d['id']};return _0x1c9e40['update'](_0x1ae242);}else{logger[_0xc63d('0x1a')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xc63d('0x2a'),_0xc63d('0x6d'),util[_0xc63d('0x39')](_0x28e17d,{'showHidden':![],'depth':null}));}})[_0xc63d('0x29')](function(_0x1dd1b0){logger['error'](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x6d'),util[_0xc63d('0x39')](_0x1dd1b0,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xc63d('0x2b'),_0xc63d('0x2a'),_0xc63d('0x6d'),_0xc63d('0x3a'));}break;case _0xc63d('0x6e'):if(_0x830ff8['apiKey']){var _0xe85df2={};var _0x4f1cd2={'method':'POST','uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0xc63d('0x6f')+_0x830ff8[_0xc63d('0x5b')],'Content-Type':'application/json'},'body':{'from':_0x830ff8[_0xc63d('0x22')],'to':_0x5114ea[_0xc63d('0x22')],'text':_0x5114ea[_0xc63d('0xe')]},'json':!![]};return rp(_0x4f1cd2)[_0xc63d('0x17')](function(_0x587046){if(_0x587046[_0xc63d('0x70')]==0xca){_0xe85df2['message']=_0x587046;var _0x46e3e8={'method':_0xc63d('0x3c'),'uri':_0xc63d('0x71'),'headers':{'Authorization':_0xc63d('0x6f')+_0x830ff8[_0xc63d('0x5b')],'Content-Type':_0xc63d('0x56')},'body':{'refid':_0xe85df2[_0xc63d('0x72')][_0xc63d('0x73')]},'json':!![]};return rp(_0x46e3e8)[_0xc63d('0x17')](function(_0x5d3f64){_0xe85df2[_0xc63d('0x74')]=_0x5d3f64;var _0x11a197={'messageId':_0xe85df2[_0xc63d('0x72')][_0xc63d('0x73')],'read':!![]};return _0x1c9e40[_0xc63d('0x18')](_0x11a197);});}else{return logger[_0xc63d('0x1a')](_0xc63d('0x2b'),'afterCreate',_0xc63d('0x6e'),util['inspect'](_0x587046,{'showHidden':![],'depth':null}));}})['catch'](function(_0x3dadc7){return logger['error'](_0xc63d('0x2b'),'afterCreate',_0xc63d('0x6e'),util['inspect'](_0x3dadc7,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0xc63d('0x2b'),'afterCreate',_0xc63d('0x6e'),'Token\x20not\x20received');}break;}}})['finally'](function(){_0x467114();});}else{_0x467114();}}},'charset':_0xc63d('0x75'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file