Built motion from commit 639a1a7f.|2.6.19
[motion2.git] / server / api / smsMessage / smsMessage.model.js
index c24e4e3..c69ef0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbac2=['out','secret','UserId','isNil','SmsInteraction','findOne','SmsInteractionId','then','update','createdAt','error','SmsAccount','find','SmsAccountId','type','twilio','accountSid','authToken','messages','phone','token','sid','SmsMessage,\x20%s,\x20%s,\x20%s','inspect','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','smsMethod','sender','&password=','password','GET','split','sms','POST','user_key','session_key','total_sent','internal_order_id','deliveryReport','read','catch','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','xCALLY\x20Motion','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','message_id','clickSend','plivo','authId','remote','/api/sms/messages/','/status?token=','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','Missing\x20parameters:\x20username,\x20password','csc','crypto','apiKey','login','text','timestamp','keys','sort','createHash','md5','digest','hex','signature=','/external/get/send.php?','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','bandwidth','accountId','/messages','applicationId','intelepeer','Bearer\x20','code','message','refid','status','finally','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase'];(function(_0x2c91e9,_0x2fb965){var _0x13f0ff=function(_0xb39edf){while(--_0xb39edf){_0x2c91e9['push'](_0x2c91e9['shift']());}};_0x13f0ff(++_0x2fb965);}(_0xbac2,0x67));var _0x2bac=function(_0x4664db,_0x1de672){_0x4664db=_0x4664db-0x0;var _0x5615b4=_0xbac2[_0x4664db];return _0x5615b4;};'use strict';var _=require(_0x2bac('0x0'));var util=require(_0x2bac('0x1'));var logger=require(_0x2bac('0x2'))(_0x2bac('0x3'));var moment=require(_0x2bac('0x4'));var BPromise=require(_0x2bac('0x5'));var rp=require(_0x2bac('0x6'));var fs=require('fs');var path=require(_0x2bac('0x7'));var rimraf=require(_0x2bac('0x8'));var config=require(_0x2bac('0x9'));var attributes=require(_0x2bac('0xa'));module[_0x2bac('0xb')]=function(_0x5af138,_0x4a1c2e){return _0x5af138[_0x2bac('0xc')](_0x2bac('0xd'),attributes,{'tableName':_0x2bac('0xe'),'paranoid':![],'indexes':[{'name':_0x2bac('0xf'),'fields':['messageId']},{'name':_0x2bac('0x10'),'fields':[_0x2bac('0x11')],'type':_0x2bac('0x12')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x2c8fca,_0x1e3cc7,_0x4ef652){var _0x2b7b51=_0x5af138[_0x2bac('0x13')];var _0x2372b1=_0x2c8fca[_0x2bac('0x14')]({'plain':!![]});if(_0x2372b1[_0x2bac('0x15')]['toLowerCase']()==='in'||_0x2372b1[_0x2bac('0x15')][_0x2bac('0x16')]()===_0x2bac('0x17')&&!_0x2372b1[_0x2bac('0x18')]&&!_['isNil'](_0x2372b1[_0x2bac('0x19')])&&!_[_0x2bac('0x1a')](_0x2372b1['SmsInteractionId'])){_0x2b7b51[_0x2bac('0x1b')][_0x2bac('0x1c')]({'where':{'id':_0x2372b1[_0x2bac('0x1d')]}})[_0x2bac('0x1e')](function(_0x4661b){if(_0x4661b){_0x4661b[_0x2bac('0x1f')]({'lastMsgAt':_0x2372b1[_0x2bac('0x20')],'lastMsgDirection':_0x2372b1['direction'][_0x2bac('0x16')]()});}})['catch'](function(_0x1deb49){console[_0x2bac('0x21')](_0x1deb49);});}if(_0x2372b1[_0x2bac('0x15')]===_0x2bac('0x17')&&!_0x2372b1[_0x2bac('0x18')]){var _0x16ae03;_0x2b7b51[_0x2bac('0x22')][_0x2bac('0x23')]({'where':{'id':_0x2372b1[_0x2bac('0x24')]},'raw':!![]})[_0x2bac('0x1e')](function(_0x31578c){_0x16ae03=_0x31578c;if(_0x16ae03&&_0x16ae03[_0x2bac('0x25')]){switch(_0x16ae03[_0x2bac('0x25')]){case _0x2bac('0x26'):var _0x464754=require(_0x2bac('0x26'));if(_0x16ae03[_0x2bac('0x27')]&&_0x16ae03['authToken']&&_0x16ae03['phone']){var _0x8d0d28=new _0x464754(_0x16ae03[_0x2bac('0x27')],_0x16ae03[_0x2bac('0x28')]);_0x8d0d28[_0x2bac('0x29')]['create']({'body':_0x2372b1[_0x2bac('0x11')],'to':_0x2372b1['phone'],'from':_0x16ae03[_0x2bac('0x2a')],'statusCallback':_0x16ae03['remote']+'/api/sms/messages/'+_0x2372b1['id']+'/status?token='+_0x16ae03[_0x2bac('0x2b')]})['then'](function(_0x5c664e){if(_0x5c664e[_0x2bac('0x2c')]){return _0x2c8fca[_0x2bac('0x1f')]({'messageId':_0x5c664e[_0x2bac('0x2c')]});}})['catch'](function(_0x396b40){logger['error'](_0x2bac('0x2d'),'afterCreate','twilio',util[_0x2bac('0x2e')](_0x396b40,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x2bac('0x2f'),'twilio',_0x2bac('0x30'));}break;case _0x2bac('0x31'):var _0x22856d=_0x2bac('0x32');if(_0x16ae03[_0x2bac('0x33')]&&_0x16ae03['password']){var _0x56e888={'recipient':[_0x2372b1[_0x2bac('0x2a')]],'message':_0x2372b1['body'],'message_type':_0x16ae03['smsMethod']};if(_0x16ae03[_0x2bac('0x34')]&&_0x16ae03[_0x2bac('0x34')]!=='SI'){_0x56e888[_0x2bac('0x35')]=_0x16ae03['phone'];}var _0x3c5d42={'url':_0x22856d+'login?username='+_0x16ae03[_0x2bac('0x33')]+_0x2bac('0x36')+_0x16ae03[_0x2bac('0x37')],'method':_0x2bac('0x38')};rp(_0x3c5d42)['then'](function(_0x45c0e9){var _0x373503=_0x45c0e9[_0x2bac('0x39')](';');var _0x33f217={'user_key':_0x373503[0x0],'session_key':_0x373503[0x1]};_0x3c5d42={'url':_0x22856d+_0x2bac('0x3a'),'method':_0x2bac('0x3b'),'headers':{'user_key':_0x33f217[_0x2bac('0x3c')],'Session_key':_0x33f217[_0x2bac('0x3d')]},'json':!![],'body':_0x56e888};return rp(_0x3c5d42);})['then'](function(_0x4b124f){if(_0x4b124f[_0x2bac('0x3e')]>=0x1){var _0x405dff={'messageId':_0x4b124f[_0x2bac('0x3f')]};if(_0x16ae03[_0x2bac('0x34')]!=='GP'||!_0x16ae03[_0x2bac('0x40')]){_0x405dff[_0x2bac('0x41')]=!![];}return _0x2c8fca[_0x2bac('0x1f')](_0x405dff);}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x31'),util['inspect'](_0x4b124f,{'showHidden':![],'depth':null}));}})[_0x2bac('0x42')](function(_0x17adb6){return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),'skebby',util['inspect'](_0x17adb6,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate','skebby','Missing\x20parameters:\x20username,\x20password');}break;case _0x2bac('0x43'):if(_0x16ae03['authToken']){var _0x1a79cc={'recipient':_0x2372b1[_0x2bac('0x2a')],'message':_0x2372b1[_0x2bac('0x11')],'sender':_0x16ae03[_0x2bac('0x44')]||_0x16ae03[_0x2bac('0x2a')],'authorization':_0x16ae03[_0x2bac('0x28')]};var _0x1e3cc7={'method':_0x2bac('0x3b'),'uri':_0x2bac('0x45'),'body':_0x1a79cc,'json':!![]};rp(_0x1e3cc7)[_0x2bac('0x1e')](function(_0x2d6864){var _0x38e49e={'messageId':_0x2d6864[_0x2bac('0x46')]};if(!_0x16ae03[_0x2bac('0x40')]){_0x38e49e[_0x2bac('0x41')]=!![];}return _0x2c8fca['update'](_0x38e49e);})[_0x2bac('0x42')](function(_0x4fabaf){logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x43'),util[_0x2bac('0x2e')](_0x4fabaf,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate','connectel',_0x2bac('0x47'));}break;case'clicksend':if(_0x16ae03['username']&&_0x16ae03[_0x2bac('0x37')]){var _0x1a79cc={'messages':[{'source':_0x2bac('0x48'),'to':_0x2372b1['phone'],'body':_0x2372b1[_0x2bac('0x11')],'from':_0x16ae03[_0x2bac('0x44')]||_0x16ae03[_0x2bac('0x2a')]}]};var _0x4d3c61=util[_0x2bac('0x49')](_0x2bac('0x4a'),_0x16ae03[_0x2bac('0x33')],_0x16ae03[_0x2bac('0x37')]);var _0x1e3cc7={'method':_0x2bac('0x3b'),'uri':_0x2bac('0x4b'),'body':_0x1a79cc,'headers':{'Authorization':util[_0x2bac('0x49')](_0x2bac('0x4c'),new Buffer(_0x4d3c61)[_0x2bac('0x4d')](_0x2bac('0x4e')))},'json':!![]};rp(_0x1e3cc7)['then'](function(_0x357d30){if(_0x357d30[_0x2bac('0x4f')]>=0xc8&&_0x357d30[_0x2bac('0x4f')]<=0xce){if(_0x357d30[_0x2bac('0x50')]&&_0x357d30[_0x2bac('0x50')][_0x2bac('0x51')]>0x0){var _0x1ae0a6=_['head'](_0x357d30['data'][_0x2bac('0x29')]);var _0x2bdb0d={'messageId':_0x1ae0a6[_0x2bac('0x52')]};if(!_0x16ae03['deliveryReport']){_0x2bdb0d['read']=!![];}return _0x2c8fca[_0x2bac('0x1f')](_0x2bdb0d);}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x53'),util[_0x2bac('0x2e')](_0x357d30,{'showHidden':![],'depth':null}));}}else{logger['error'](_0x2bac('0x2d'),_0x2bac('0x2f'),'clickSend',util['inspect'](_0x357d30,{'showHidden':![],'depth':null}));}})[_0x2bac('0x42')](function(_0x653213){logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x53'),util[_0x2bac('0x2e')](_0x653213,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x53'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x2bac('0x54'):if(_0x16ae03[_0x2bac('0x55')]&&_0x16ae03[_0x2bac('0x28')]){var _0x1a79cc={'dst':_0x2372b1[_0x2bac('0x2a')],'text':_0x2372b1[_0x2bac('0x11')],'src':_0x16ae03[_0x2bac('0x44')]||_0x16ae03[_0x2bac('0x2a')],'url':_0x16ae03[_0x2bac('0x56')]+_0x2bac('0x57')+_0x2372b1['id']+_0x2bac('0x58')+_0x16ae03[_0x2bac('0x2b')]};var _0x4d3c61=util[_0x2bac('0x49')](_0x2bac('0x4a'),_0x16ae03[_0x2bac('0x55')],_0x16ae03['authToken']);var _0x1e3cc7={'method':'POST','uri':util[_0x2bac('0x49')]('https://api.plivo.com/v1/Account/%s/Message/',_0x16ae03[_0x2bac('0x55')]),'body':_0x1a79cc,'headers':{'Authorization':util[_0x2bac('0x49')](_0x2bac('0x4c'),new Buffer(_0x4d3c61)[_0x2bac('0x4d')](_0x2bac('0x4e')))},'json':!![]};rp(_0x1e3cc7)['then'](function(_0x5948b4){var _0xd6d770={'messageId':_0x5948b4['message_uuid'][0x0]};return _0x2c8fca[_0x2bac('0x1f')](_0xd6d770);})[_0x2bac('0x42')](function(_0x5d170d){logger[_0x2bac('0x21')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x2bac('0x2f'),_0x2bac('0x54'),util[_0x2bac('0x2e')](_0x5d170d,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x54'),'Missing\x20parameters:\x20authId,\x20authToken');}break;case _0x2bac('0x59'):if(_0x16ae03[_0x2bac('0x33')]&&_0x16ae03['password']){if(_0x16ae03[_0x2bac('0x5a')]){var _0x4a0d49={'method':'POST','uri':_0x16ae03['baseUrl']+_0x2bac('0x5b'),'body':{'username':_0x16ae03['username'],'password':_0x16ae03[_0x2bac('0x37')]},'json':!![]};return rp(_0x4a0d49)['then'](function(_0x4a7f8c){var _0x8d5561={'method':_0x2bac('0x3b'),'uri':_0x16ae03[_0x2bac('0x5a')]+_0x2bac('0x5c'),'body':{'messages':[{'from':_0x16ae03['phone'],'destinations':[{'to':_0x2372b1[_0x2bac('0x2a')]}],'text':_0x2372b1[_0x2bac('0x11')],'notifyUrl':_0x16ae03[_0x2bac('0x56')]+_0x2bac('0x57')+_0x2372b1['id']+'/status?token='+_0x16ae03[_0x2bac('0x2b')],'notifyContentType':_0x2bac('0x5d'),'callbackData':_0x16ae03['phone']+';'+_0x2372b1[_0x2bac('0x11')]}]},'headers':{'Authorization':_0x2bac('0x5e')+_0x4a7f8c[_0x2bac('0x2b')]},'json':!![]};return rp(_0x8d5561)[_0x2bac('0x1e')](function(_0x4cd197){if(_0x4cd197['messages']){var _0x39ff0b={'messageId':_0x4cd197[_0x2bac('0x29')][0x0][_0x2bac('0xf')]};if(!_0x16ae03[_0x2bac('0x40')]){_0x39ff0b['read']=!![];}return _0x2c8fca[_0x2bac('0x1f')](_0x39ff0b);}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x59'),util[_0x2bac('0x2e')](_0x4cd197,{'showHidden':![],'depth':null}));}});})[_0x2bac('0x42')](function(_0x7fef72){return logger[_0x2bac('0x21')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','infobip',util[_0x2bac('0x2e')](_0x7fef72,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x59'),_0x2bac('0x5f'));}}else{logger[_0x2bac('0x21')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x2bac('0x59'),_0x2bac('0x60'));}break;case _0x2bac('0x61'):var _0x2e060b=require(_0x2bac('0x62'));if(_0x16ae03[_0x2bac('0x63')]){var _0x5576f2={};_0x5576f2[_0x2bac('0x64')]=_0x16ae03[_0x2bac('0x33')];_0x5576f2[_0x2bac('0x2a')]=_0x2372b1[_0x2bac('0x2a')];_0x5576f2[_0x2bac('0x35')]=_0x16ae03['phone'];_0x5576f2[_0x2bac('0x65')]=_0x2372b1[_0x2bac('0x11')];_0x5576f2[_0x2bac('0x66')]=+new Date();var _0x2160f2='';var _0x282412='';var _0x498bb6=Object[_0x2bac('0x67')](_0x5576f2);_0x498bb6[_0x2bac('0x68')]();for(var _0x837352=0x0;_0x837352<_0x498bb6['length'];_0x837352++){if(_0x2160f2!=''){_0x2160f2+='&';}_0x2160f2+=_0x498bb6[_0x837352]+'='+encodeURIComponent(_0x5576f2[_0x498bb6[_0x837352]]);_0x282412+=_0x5576f2[_0x498bb6[_0x837352]];}_0x282412+=_0x16ae03['apiKey'];_0x282412=_0x2e060b[_0x2bac('0x69')](_0x2bac('0x6a'))['update'](_0x282412)[_0x2bac('0x6b')](_0x2bac('0x6c'));if(_0x2160f2!==''){_0x2160f2+='&';}_0x2160f2+=_0x2bac('0x6d')+_0x282412;var _0x3c5d42={'method':_0x2bac('0x38'),'uri':_0x16ae03[_0x2bac('0x5a')]+_0x2bac('0x6e')+_0x2160f2,'json':!![]};return rp(_0x3c5d42)[_0x2bac('0x1e')](function(_0x45ff17){var _0x4027a2=Object[_0x2bac('0x67')](_0x45ff17);if(_0x45ff17[_0x4027a2[0x0]][_0x2bac('0x21')]&&parseInt(_0x45ff17[_0x4027a2[0x0]][_0x2bac('0x21')])===0x0){var _0x25f8fa={'messageId':_0x45ff17[_0x4027a2[0x0]]['id_sms']};if(!_0x16ae03[_0x2bac('0x40')]){_0x25f8fa[_0x2bac('0x41')]=!![];}return _0x2c8fca[_0x2bac('0x1f')](_0x25f8fa);}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x61'),util[_0x2bac('0x2e')](_0x45ff17['error'],{'showHidden':![],'depth':null}));}})['catch'](function(_0xf2e6a2){return logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x61'),util[_0x2bac('0x2e')](_0xf2e6a2,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x61'),_0x2bac('0x6f'));}break;case _0x2bac('0x70'):if(_0x16ae03[_0x2bac('0x63')]){var _0x4b21a7={'method':_0x2bac('0x3b'),'uri':_0x2bac('0x71'),'headers':{'Authorization':_0x16ae03[_0x2bac('0x63')]},'body':{'content':_0x2372b1[_0x2bac('0x11')],'to':[_0x2372b1[_0x2bac('0x2a')]],'from':_0x16ae03[_0x2bac('0x2a')],'binary':![],'clientMessageId':'uuid','charset':'UTF-8'},'json':!![]};rp(_0x4b21a7)[_0x2bac('0x1e')](function(_0x2a490d){if(!_0x2a490d[_0x2bac('0x21')]){var _0x3992d2={'messageId':_0x2a490d[_0x2bac('0x29')][0x0]['apiMessageId']};if(!_0x16ae03['deliveryReport']){_0x3992d2['read']=!![];}return _0x2c8fca[_0x2bac('0x1f')](_0x3992d2);}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x70'),util[_0x2bac('0x2e')](_0x2a490d[_0x2bac('0x21')],{'showHidden':![],'depth':null}));}})[_0x2bac('0x42')](function(_0x443dd9){return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x70'),util[_0x2bac('0x2e')](_0x443dd9,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),'clickatell',_0x2bac('0x6f'));}break;case _0x2bac('0x72'):if(_0x16ae03[_0x2bac('0x33')]&&_0x16ae03['password']){var _0x4d3c61=util[_0x2bac('0x49')](_0x2bac('0x4a'),_0x16ae03[_0x2bac('0x33')],_0x16ae03['password']);var _0x1e3cc7={'method':_0x2bac('0x3b'),'uri':'https://messaging.bandwidth.com/api/v2/users/'+_0x16ae03[_0x2bac('0x73')]+_0x2bac('0x74'),'body':{'to':[_0x2372b1[_0x2bac('0x2a')]],'text':_0x2372b1[_0x2bac('0x11')],'from':_0x16ae03['phone'],'applicationId':_0x16ae03[_0x2bac('0x75')]},'headers':{'Authorization':util['format'](_0x2bac('0x4c'),new Buffer(_0x4d3c61)[_0x2bac('0x4d')](_0x2bac('0x4e')))},'json':!![]};rp(_0x1e3cc7)[_0x2bac('0x1e')](function(_0x39df22){if(_0x39df22['id']){var _0x38a211={'messageId':_0x39df22['id']};return _0x2c8fca['update'](_0x38a211);}else{logger[_0x2bac('0x21')](_0x2bac('0x2d'),'afterCreate',_0x2bac('0x72'),util['inspect'](_0x39df22,{'showHidden':![],'depth':null}));}})['catch'](function(_0x21d903){logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','bandwidth',util[_0x2bac('0x2e')](_0x21d903,{'showHidden':![],'depth':null}));});}else{logger[_0x2bac('0x21')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x2bac('0x2f'),'bandwidth','Missing\x20parameters:\x20username,\x20password');}break;case _0x2bac('0x76'):if(_0x16ae03[_0x2bac('0x63')]){var _0x26bdef={};var _0x3c5d42={'method':'POST','uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':_0x2bac('0x77')+_0x16ae03[_0x2bac('0x63')],'Content-Type':_0x2bac('0x5d')},'body':{'from':_0x16ae03[_0x2bac('0x2a')],'to':_0x2372b1['phone'],'text':_0x2372b1[_0x2bac('0x11')]},'json':!![]};return rp(_0x3c5d42)[_0x2bac('0x1e')](function(_0x55b55d){if(_0x55b55d[_0x2bac('0x78')]==0xca){_0x26bdef[_0x2bac('0x79')]=_0x55b55d;var _0x1c9198={'method':_0x2bac('0x3b'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/mdr','headers':{'Authorization':'Bearer\x20'+_0x16ae03[_0x2bac('0x63')],'Content-Type':'application/json'},'body':{'refid':_0x26bdef[_0x2bac('0x79')][_0x2bac('0x7a')]},'json':!![]};return rp(_0x1c9198)[_0x2bac('0x1e')](function(_0x131c09){_0x26bdef[_0x2bac('0x7b')]=_0x131c09;var _0x4a0c8d={'messageId':_0x26bdef[_0x2bac('0x79')][_0x2bac('0x7a')],'read':!![]};return _0x2c8fca['update'](_0x4a0c8d);});}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x76'),util[_0x2bac('0x2e')](_0x55b55d,{'showHidden':![],'depth':null}));}})['catch'](function(_0x18f559){return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),_0x2bac('0x76'),util[_0x2bac('0x2e')](_0x18f559,{'showHidden':![],'depth':null}));});}else{return logger[_0x2bac('0x21')](_0x2bac('0x2d'),_0x2bac('0x2f'),'intelepeer','Token\x20not\x20received');}break;}}})[_0x2bac('0x7c')](function(){_0x4ef652();});}else{_0x4ef652();}}},'charset':'utf8mb4','collate':_0x2bac('0x7d')});};
\ No newline at end of file
+var _0x27b0=['requestid','read','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','%s:%s','Basic\x20%s','toString','base64','http_code','data','queued_count','clickSend','Missing\x20parameters:\x20username,\x20password','https://api.plivo.com/v1/Account/%s/Message/','authId','message_uuid','plivo','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','login','text','keys','sort','length','createHash','md5','digest','hex','signature=','/external/get/send.php?','Missing\x20parameters:\x20apiKey','apiKey','https://platform.clickatell.com/messages','uuid','UTF-8','apiMessageId','clickatell','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','applicationId','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','message','refid','intelepeer','Token\x20not\x20received','finally','utf8mb4','utf8mb4_unicode_ci','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','define','messageId','body','FULLTEXT','get','toLowerCase','direction','out','secret','isNil','UserId','SmsInteractionId','SmsInteraction','findOne','then','update','createdAt','catch','SmsAccount','find','SmsAccountId','type','authToken','phone','accountSid','messages','create','remote','/api/sms/messages/','/status?token=','token','sid','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','twilio','inspect','error','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','&password=','GET','split','sms','user_key','session_key','internal_order_id','deliveryReport','connectel','senderString','POST','https://smsapi.connectel.se/api/v2/send/'];(function(_0x4653d4,_0x17c5c1){var _0x55e8b6=function(_0x46dbe4){while(--_0x46dbe4){_0x4653d4['push'](_0x4653d4['shift']());}};_0x55e8b6(++_0x17c5c1);}(_0x27b0,0x139));var _0x027b=function(_0x55c00d,_0x520cb6){_0x55c00d=_0x55c00d-0x0;var _0x254a8f=_0x27b0[_0x55c00d];return _0x254a8f;};'use strict';var _=require('lodash');var util=require(_0x027b('0x0'));var logger=require(_0x027b('0x1'))('api');var moment=require(_0x027b('0x2'));var BPromise=require(_0x027b('0x3'));var rp=require(_0x027b('0x4'));var fs=require('fs');var path=require(_0x027b('0x5'));var rimraf=require(_0x027b('0x6'));var config=require(_0x027b('0x7'));var attributes=require(_0x027b('0x8'));module['exports']=function(_0x534539,_0x40ece1){return _0x534539[_0x027b('0x9')]('SmsMessage',attributes,{'tableName':'sms_messages','paranoid':![],'indexes':[{'name':_0x027b('0xa'),'fields':[_0x027b('0xa')]},{'name':'fti_sms_messages','fields':[_0x027b('0xb')],'type':_0x027b('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x314078,_0x166b15,_0x2ef243){var _0x31f831=_0x534539['models'];var _0x151211=_0x314078[_0x027b('0xd')]({'plain':!![]});if(_0x151211['direction'][_0x027b('0xe')]()==='in'||_0x151211[_0x027b('0xf')]['toLowerCase']()===_0x027b('0x10')&&!_0x151211[_0x027b('0x11')]&&!_[_0x027b('0x12')](_0x151211[_0x027b('0x13')])&&!_['isNil'](_0x151211[_0x027b('0x14')])){_0x31f831[_0x027b('0x15')][_0x027b('0x16')]({'where':{'id':_0x151211[_0x027b('0x14')]}})[_0x027b('0x17')](function(_0x188f67){if(_0x188f67){_0x188f67[_0x027b('0x18')]({'lastMsgAt':_0x151211[_0x027b('0x19')],'lastMsgDirection':_0x151211[_0x027b('0xf')]['toLowerCase']()});}})[_0x027b('0x1a')](function(_0x1e0611){console['error'](_0x1e0611);});}if(_0x151211['direction']===_0x027b('0x10')&&!_0x151211[_0x027b('0x11')]){var _0xf61891;_0x31f831[_0x027b('0x1b')][_0x027b('0x1c')]({'where':{'id':_0x151211[_0x027b('0x1d')]},'raw':!![]})[_0x027b('0x17')](function(_0x243063){_0xf61891=_0x243063;if(_0xf61891&&_0xf61891[_0x027b('0x1e')]){switch(_0xf61891[_0x027b('0x1e')]){case'twilio':var _0x532af5=require('twilio');if(_0xf61891['accountSid']&&_0xf61891[_0x027b('0x1f')]&&_0xf61891[_0x027b('0x20')]){var _0x30ff47=new _0x532af5(_0xf61891[_0x027b('0x21')],_0xf61891[_0x027b('0x1f')]);_0x30ff47[_0x027b('0x22')][_0x027b('0x23')]({'body':_0x151211[_0x027b('0xb')],'to':_0x151211['phone'],'from':_0xf61891[_0x027b('0x20')],'statusCallback':_0xf61891[_0x027b('0x24')]+_0x027b('0x25')+_0x151211['id']+_0x027b('0x26')+_0xf61891[_0x027b('0x27')]})['then'](function(_0x3b2bfe){if(_0x3b2bfe['sid']){return _0x314078[_0x027b('0x18')]({'messageId':_0x3b2bfe[_0x027b('0x28')]});}})[_0x027b('0x1a')](function(_0x4619d1){logger['error'](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x2b'),util[_0x027b('0x2c')](_0x4619d1,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),_0x027b('0x2b'),_0x027b('0x2e'));}break;case _0x027b('0x2f'):var _0x337377=_0x027b('0x30');if(_0xf61891[_0x027b('0x31')]&&_0xf61891[_0x027b('0x32')]){var _0x3cda99={'recipient':[_0x151211['phone']],'message':_0x151211[_0x027b('0xb')],'message_type':_0xf61891[_0x027b('0x33')]};if(_0xf61891[_0x027b('0x33')]&&_0xf61891[_0x027b('0x33')]!=='SI'){_0x3cda99[_0x027b('0x34')]=_0xf61891[_0x027b('0x20')];}var _0x41193a={'url':_0x337377+'login?username='+_0xf61891['username']+_0x027b('0x35')+_0xf61891[_0x027b('0x32')],'method':_0x027b('0x36')};rp(_0x41193a)[_0x027b('0x17')](function(_0x53ac9c){var _0xcc10e5=_0x53ac9c[_0x027b('0x37')](';');var _0x2e7217={'user_key':_0xcc10e5[0x0],'session_key':_0xcc10e5[0x1]};_0x41193a={'url':_0x337377+_0x027b('0x38'),'method':'POST','headers':{'user_key':_0x2e7217[_0x027b('0x39')],'Session_key':_0x2e7217[_0x027b('0x3a')]},'json':!![],'body':_0x3cda99};return rp(_0x41193a);})[_0x027b('0x17')](function(_0x485881){if(_0x485881['total_sent']>=0x1){var _0x1a0198={'messageId':_0x485881[_0x027b('0x3b')]};if(_0xf61891[_0x027b('0x33')]!=='GP'||!_0xf61891[_0x027b('0x3c')]){_0x1a0198['read']=!![];}return _0x314078[_0x027b('0x18')](_0x1a0198);}else{return logger['error'](_0x027b('0x29'),'afterCreate',_0x027b('0x2f'),util[_0x027b('0x2c')](_0x485881,{'showHidden':![],'depth':null}));}})[_0x027b('0x1a')](function(_0x14b12c){return logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),'skebby',util[_0x027b('0x2c')](_0x14b12c,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x2f'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x027b('0x3d'):if(_0xf61891[_0x027b('0x1f')]){var _0x7fde28={'recipient':_0x151211['phone'],'message':_0x151211[_0x027b('0xb')],'sender':_0xf61891[_0x027b('0x3e')]||_0xf61891[_0x027b('0x20')],'authorization':_0xf61891[_0x027b('0x1f')]};var _0x166b15={'method':_0x027b('0x3f'),'uri':_0x027b('0x40'),'body':_0x7fde28,'json':!![]};rp(_0x166b15)[_0x027b('0x17')](function(_0x1ae731){var _0x37f713={'messageId':_0x1ae731[_0x027b('0x41')]};if(!_0xf61891['deliveryReport']){_0x37f713[_0x027b('0x42')]=!![];}return _0x314078[_0x027b('0x18')](_0x37f713);})[_0x027b('0x1a')](function(_0x2e8d27){logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x3d'),util[_0x027b('0x2c')](_0x2e8d27,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')](_0x027b('0x29'),'afterCreate',_0x027b('0x3d'),_0x027b('0x43'));}break;case _0x027b('0x44'):if(_0xf61891['username']&&_0xf61891['password']){var _0x7fde28={'messages':[{'source':_0x027b('0x45'),'to':_0x151211[_0x027b('0x20')],'body':_0x151211['body'],'from':_0xf61891[_0x027b('0x3e')]||_0xf61891[_0x027b('0x20')]}]};var _0x13c391=util[_0x027b('0x46')](_0x027b('0x47'),_0xf61891['username'],_0xf61891[_0x027b('0x32')]);var _0x166b15={'method':_0x027b('0x3f'),'uri':'https://rest.clicksend.com/v3/sms/send','body':_0x7fde28,'headers':{'Authorization':util[_0x027b('0x46')](_0x027b('0x48'),new Buffer(_0x13c391)[_0x027b('0x49')](_0x027b('0x4a')))},'json':!![]};rp(_0x166b15)[_0x027b('0x17')](function(_0x5cc6ce){if(_0x5cc6ce[_0x027b('0x4b')]>=0xc8&&_0x5cc6ce[_0x027b('0x4b')]<=0xce){if(_0x5cc6ce[_0x027b('0x4c')]&&_0x5cc6ce[_0x027b('0x4c')][_0x027b('0x4d')]>0x0){var _0x17aa81=_['head'](_0x5cc6ce['data'][_0x027b('0x22')]);var _0x43055e={'messageId':_0x17aa81['message_id']};if(!_0xf61891[_0x027b('0x3c')]){_0x43055e['read']=!![];}return _0x314078[_0x027b('0x18')](_0x43055e);}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x4e'),util[_0x027b('0x2c')](_0x5cc6ce,{'showHidden':![],'depth':null}));}}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x4e'),util[_0x027b('0x2c')](_0x5cc6ce,{'showHidden':![],'depth':null}));}})[_0x027b('0x1a')](function(_0x80026a){logger[_0x027b('0x2d')](_0x027b('0x29'),'afterCreate',_0x027b('0x4e'),util[_0x027b('0x2c')](_0x80026a,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')](_0x027b('0x29'),'afterCreate','clickSend',_0x027b('0x4f'));}break;case'plivo':if(_0xf61891['authId']&&_0xf61891[_0x027b('0x1f')]){var _0x7fde28={'dst':_0x151211['phone'],'text':_0x151211['body'],'src':_0xf61891['senderString']||_0xf61891[_0x027b('0x20')],'url':_0xf61891[_0x027b('0x24')]+_0x027b('0x25')+_0x151211['id']+_0x027b('0x26')+_0xf61891['token']};var _0x13c391=util[_0x027b('0x46')](_0x027b('0x47'),_0xf61891['authId'],_0xf61891[_0x027b('0x1f')]);var _0x166b15={'method':'POST','uri':util[_0x027b('0x46')](_0x027b('0x50'),_0xf61891[_0x027b('0x51')]),'body':_0x7fde28,'headers':{'Authorization':util[_0x027b('0x46')](_0x027b('0x48'),new Buffer(_0x13c391)[_0x027b('0x49')](_0x027b('0x4a')))},'json':!![]};rp(_0x166b15)[_0x027b('0x17')](function(_0x3ea56f){var _0xaedf69={'messageId':_0x3ea56f[_0x027b('0x52')][0x0]};return _0x314078['update'](_0xaedf69);})[_0x027b('0x1a')](function(_0x32b858){logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),_0x027b('0x53'),util['inspect'](_0x32b858,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x53'),_0x027b('0x54'));}break;case _0x027b('0x55'):if(_0xf61891[_0x027b('0x31')]&&_0xf61891[_0x027b('0x32')]){if(_0xf61891[_0x027b('0x56')]){var _0x4b9319={'method':_0x027b('0x3f'),'uri':_0xf61891['baseUrl']+_0x027b('0x57'),'body':{'username':_0xf61891[_0x027b('0x31')],'password':_0xf61891['password']},'json':!![]};return rp(_0x4b9319)['then'](function(_0x3fedff){var _0x1e8e57={'method':_0x027b('0x3f'),'uri':_0xf61891['baseUrl']+_0x027b('0x58'),'body':{'messages':[{'from':_0xf61891[_0x027b('0x20')],'destinations':[{'to':_0x151211[_0x027b('0x20')]}],'text':_0x151211['body'],'notifyUrl':_0xf61891[_0x027b('0x24')]+_0x027b('0x25')+_0x151211['id']+_0x027b('0x26')+_0xf61891[_0x027b('0x27')],'notifyContentType':_0x027b('0x59'),'callbackData':_0xf61891[_0x027b('0x20')]+';'+_0x151211[_0x027b('0xb')]}]},'headers':{'Authorization':_0x027b('0x5a')+_0x3fedff[_0x027b('0x27')]},'json':!![]};return rp(_0x1e8e57)[_0x027b('0x17')](function(_0x24362b){if(_0x24362b[_0x027b('0x22')]){var _0x1f251a={'messageId':_0x24362b['messages'][0x0]['messageId']};if(!_0xf61891[_0x027b('0x3c')]){_0x1f251a['read']=!![];}return _0x314078[_0x027b('0x18')](_0x1f251a);}else{return logger['error'](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x55'),util[_0x027b('0x2c')](_0x24362b,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x2014dc){return logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),_0x027b('0x55'),util[_0x027b('0x2c')](_0x2014dc,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),'infobip',_0x027b('0x5b'));}}else{logger[_0x027b('0x2d')](_0x027b('0x29'),'afterCreate',_0x027b('0x55'),_0x027b('0x4f'));}break;case _0x027b('0x5c'):var _0x741002=require('crypto');if(_0xf61891['apiKey']){var _0x1cc950={};_0x1cc950[_0x027b('0x5d')]=_0xf61891['username'];_0x1cc950['phone']=_0x151211['phone'];_0x1cc950[_0x027b('0x34')]=_0xf61891[_0x027b('0x20')];_0x1cc950[_0x027b('0x5e')]=_0x151211[_0x027b('0xb')];_0x1cc950['timestamp']=+new Date();var _0x13a06d='';var _0x2603d7='';var _0x2d6c3b=Object[_0x027b('0x5f')](_0x1cc950);_0x2d6c3b[_0x027b('0x60')]();for(var _0x1da69b=0x0;_0x1da69b<_0x2d6c3b[_0x027b('0x61')];_0x1da69b++){if(_0x13a06d!=''){_0x13a06d+='&';}_0x13a06d+=_0x2d6c3b[_0x1da69b]+'='+encodeURIComponent(_0x1cc950[_0x2d6c3b[_0x1da69b]]);_0x2603d7+=_0x1cc950[_0x2d6c3b[_0x1da69b]];}_0x2603d7+=_0xf61891['apiKey'];_0x2603d7=_0x741002[_0x027b('0x62')](_0x027b('0x63'))[_0x027b('0x18')](_0x2603d7)[_0x027b('0x64')](_0x027b('0x65'));if(_0x13a06d!==''){_0x13a06d+='&';}_0x13a06d+=_0x027b('0x66')+_0x2603d7;var _0x41193a={'method':_0x027b('0x36'),'uri':_0xf61891['baseUrl']+_0x027b('0x67')+_0x13a06d,'json':!![]};return rp(_0x41193a)['then'](function(_0x50bcfa){var _0x40010b=Object[_0x027b('0x5f')](_0x50bcfa);if(_0x50bcfa[_0x40010b[0x0]]['error']&&parseInt(_0x50bcfa[_0x40010b[0x0]][_0x027b('0x2d')])===0x0){var _0x50ba98={'messageId':_0x50bcfa[_0x40010b[0x0]]['id_sms']};if(!_0xf61891[_0x027b('0x3c')]){_0x50ba98['read']=!![];}return _0x314078[_0x027b('0x18')](_0x50ba98);}else{return logger['error'](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x5c'),util['inspect'](_0x50bcfa[_0x027b('0x2d')],{'showHidden':![],'depth':null}));}})[_0x027b('0x1a')](function(_0x34753f){return logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x5c'),util[_0x027b('0x2c')](_0x34753f,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x027b('0x29'),'afterCreate','csc',_0x027b('0x68'));}break;case'clickatell':if(_0xf61891[_0x027b('0x69')]){var _0x13946b={'method':_0x027b('0x3f'),'uri':_0x027b('0x6a'),'headers':{'Authorization':_0xf61891['apiKey']},'body':{'content':_0x151211[_0x027b('0xb')],'to':[_0x151211[_0x027b('0x20')]],'from':_0xf61891[_0x027b('0x20')],'binary':![],'clientMessageId':_0x027b('0x6b'),'charset':_0x027b('0x6c')},'json':!![]};rp(_0x13946b)[_0x027b('0x17')](function(_0x395b63){if(!_0x395b63['error']){var _0x393230={'messageId':_0x395b63['messages'][0x0][_0x027b('0x6d')]};if(!_0xf61891[_0x027b('0x3c')]){_0x393230[_0x027b('0x42')]=!![];}return _0x314078[_0x027b('0x18')](_0x393230);}else{return logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),'clickatell',util[_0x027b('0x2c')](_0x395b63['error'],{'showHidden':![],'depth':null}));}})[_0x027b('0x1a')](function(_0x2c0413){return logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x027b('0x6e'),util[_0x027b('0x2c')](_0x2c0413,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x6e'),_0x027b('0x68'));}break;case _0x027b('0x6f'):if(_0xf61891['username']&&_0xf61891[_0x027b('0x32')]){var _0x13c391=util[_0x027b('0x46')](_0x027b('0x47'),_0xf61891[_0x027b('0x31')],_0xf61891['password']);var _0x166b15={'method':_0x027b('0x3f'),'uri':_0x027b('0x70')+_0xf61891[_0x027b('0x71')]+'/messages','body':{'to':[_0x151211['phone']],'text':_0x151211[_0x027b('0xb')],'from':_0xf61891['phone'],'applicationId':_0xf61891[_0x027b('0x72')]},'headers':{'Authorization':util['format'](_0x027b('0x48'),new Buffer(_0x13c391)['toString'](_0x027b('0x4a')))},'json':!![]};rp(_0x166b15)['then'](function(_0x4d5a2e){if(_0x4d5a2e['id']){var _0x5e2003={'messageId':_0x4d5a2e['id']};return _0x314078['update'](_0x5e2003);}else{logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x6f'),util[_0x027b('0x2c')](_0x4d5a2e,{'showHidden':![],'depth':null}));}})[_0x027b('0x1a')](function(_0x471a46){logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),'bandwidth',util[_0x027b('0x2c')](_0x471a46,{'showHidden':![],'depth':null}));});}else{logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),_0x027b('0x6f'),_0x027b('0x4f'));}break;case'intelepeer':if(_0xf61891[_0x027b('0x69')]){var _0x2e72ed={};var _0x41193a={'method':_0x027b('0x3f'),'uri':_0x027b('0x73'),'headers':{'Authorization':_0x027b('0x74')+_0xf61891[_0x027b('0x69')],'Content-Type':'application/json'},'body':{'from':_0xf61891[_0x027b('0x20')],'to':_0x151211[_0x027b('0x20')],'text':_0x151211[_0x027b('0xb')]},'json':!![]};return rp(_0x41193a)[_0x027b('0x17')](function(_0x374053){if(_0x374053[_0x027b('0x75')]==0xca){_0x2e72ed['message']=_0x374053;var _0x198bc9={'method':_0x027b('0x3f'),'uri':_0x027b('0x76'),'headers':{'Authorization':_0x027b('0x74')+_0xf61891['apiKey'],'Content-Type':_0x027b('0x59')},'body':{'refid':_0x2e72ed[_0x027b('0x77')][_0x027b('0x78')]},'json':!![]};return rp(_0x198bc9)[_0x027b('0x17')](function(_0x54aa94){_0x2e72ed['status']=_0x54aa94;var _0x336f3b={'messageId':_0x2e72ed[_0x027b('0x77')][_0x027b('0x78')],'read':!![]};return _0x314078[_0x027b('0x18')](_0x336f3b);});}else{return logger[_0x027b('0x2d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x027b('0x2a'),_0x027b('0x79'),util[_0x027b('0x2c')](_0x374053,{'showHidden':![],'depth':null}));}})['catch'](function(_0x3a52c2){return logger[_0x027b('0x2d')](_0x027b('0x29'),_0x027b('0x2a'),_0x027b('0x79'),util[_0x027b('0x2c')](_0x3a52c2,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0x027b('0x29'),'afterCreate',_0x027b('0x79'),_0x027b('0x7a'));}break;}}})[_0x027b('0x7b')](function(){_0x2ef243();});}else{_0x2ef243();}}},'charset':_0x027b('0x7c'),'collate':_0x027b('0x7d')});};
\ No newline at end of file