Built motion from commit b0a9a629.|2.6.33
[motion2.git] / server / api / smsMessage / smsMessage.model.js
index 93bfa31..46b387c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1675=['keys','sort','length','md5','digest','hex','/external/get/send.php?','id_sms','Missing\x20parameters:\x20apiKey','clickatell','uuid','apiMessageId','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','Bearer\x20','code','message','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','status','Token\x20not\x20received','finally','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','exports','define','sms_messages','messageId','fti_sms_messages','models','get','direction','out','secret','UserId','isNil','SmsInteraction','findOne','SmsInteractionId','update','createdAt','catch','error','SmsAccount','find','SmsAccountId','type','twilio','authToken','phone','messages','create','body','/api/sms/messages/','/status?token=','then','sid','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','smsMethod','sender','login?username=','&password=','password','GET','split','POST','user_key','deliveryReport','read','SmsMessage,\x20%s,\x20%s,\x20%s','senderString','https://smsapi.connectel.se/api/v2/send/','requestid','Missing\x20parameters:\x20authToken','clicksend','username','xCALLY\x20Motion','%s:%s','https://rest.clicksend.com/v3/sms/send','format','Basic\x20%s','toString','base64','http_code','data','queued_count','head','message_id','clickSend','Missing\x20parameters:\x20username,\x20password','plivo','authId','remote','token','https://api.plivo.com/v1/Account/%s/Message/','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','text','timestamp'];(function(_0x3dec4a,_0x153b54){var _0x2f8f71=function(_0x1d2291){while(--_0x1d2291){_0x3dec4a['push'](_0x3dec4a['shift']());}};_0x2f8f71(++_0x153b54);}(_0x1675,0x199));var _0x5167=function(_0x5477d0,_0x1a9a77){_0x5477d0=_0x5477d0-0x0;var _0x3807c8=_0x1675[_0x5477d0];return _0x3807c8;};'use strict';var _=require(_0x5167('0x0'));var util=require(_0x5167('0x1'));var logger=require(_0x5167('0x2'))(_0x5167('0x3'));var moment=require(_0x5167('0x4'));var BPromise=require(_0x5167('0x5'));var rp=require(_0x5167('0x6'));var fs=require('fs');var path=require(_0x5167('0x7'));var rimraf=require(_0x5167('0x8'));var config=require(_0x5167('0x9'));var attributes=require(_0x5167('0xa'));module[_0x5167('0xb')]=function(_0x3580ce,_0x287b2d){return _0x3580ce[_0x5167('0xc')]('SmsMessage',attributes,{'tableName':_0x5167('0xd'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x5167('0xe')]},{'name':_0x5167('0xf'),'fields':['body'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x356d8a,_0x1751c4,_0x1f432a){var _0x209c27=_0x3580ce[_0x5167('0x10')];var _0x349893=_0x356d8a[_0x5167('0x11')]({'plain':!![]});if(_0x349893[_0x5167('0x12')]['toLowerCase']()==='in'||_0x349893[_0x5167('0x12')]['toLowerCase']()===_0x5167('0x13')&&!_0x349893[_0x5167('0x14')]&&!_['isNil'](_0x349893[_0x5167('0x15')])&&!_[_0x5167('0x16')](_0x349893['SmsInteractionId'])){_0x209c27[_0x5167('0x17')][_0x5167('0x18')]({'where':{'id':_0x349893[_0x5167('0x19')]}})['then'](function(_0x1e04e0){if(_0x1e04e0){_0x1e04e0[_0x5167('0x1a')]({'lastMsgAt':_0x349893[_0x5167('0x1b')],'lastMsgDirection':_0x349893[_0x5167('0x12')]['toLowerCase']()});}})[_0x5167('0x1c')](function(_0x52a288){console[_0x5167('0x1d')](_0x52a288);});}if(_0x349893[_0x5167('0x12')]===_0x5167('0x13')&&!_0x349893['secret']){var _0x41834e;_0x209c27[_0x5167('0x1e')][_0x5167('0x1f')]({'where':{'id':_0x349893[_0x5167('0x20')]},'raw':!![]})['then'](function(_0x2a3fd7){_0x41834e=_0x2a3fd7;if(_0x41834e&&_0x41834e[_0x5167('0x21')]){switch(_0x41834e['type']){case'twilio':var _0x1e85c8=require(_0x5167('0x22'));if(_0x41834e['accountSid']&&_0x41834e[_0x5167('0x23')]&&_0x41834e[_0x5167('0x24')]){var _0x479102=new _0x1e85c8(_0x41834e['accountSid'],_0x41834e[_0x5167('0x23')]);_0x479102[_0x5167('0x25')][_0x5167('0x26')]({'body':_0x349893[_0x5167('0x27')],'to':_0x349893[_0x5167('0x24')],'from':_0x41834e[_0x5167('0x24')],'statusCallback':_0x41834e['remote']+_0x5167('0x28')+_0x349893['id']+_0x5167('0x29')+_0x41834e['token']})[_0x5167('0x2a')](function(_0x53d7a6){if(_0x53d7a6[_0x5167('0x2b')]){return _0x356d8a[_0x5167('0x1a')]({'messageId':_0x53d7a6[_0x5167('0x2b')]});}})[_0x5167('0x1c')](function(_0xc47e84){logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),'twilio',util[_0x5167('0x2d')](_0xc47e84,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x22'),_0x5167('0x2e'));}break;case _0x5167('0x2f'):var _0x4e76ff=_0x5167('0x30');if(_0x41834e['username']&&_0x41834e['password']){var _0x5a0a6e={'recipient':[_0x349893[_0x5167('0x24')]],'message':_0x349893['body'],'message_type':_0x41834e[_0x5167('0x31')]};if(_0x41834e[_0x5167('0x31')]&&_0x41834e[_0x5167('0x31')]!=='SI'){_0x5a0a6e[_0x5167('0x32')]=_0x41834e['phone'];}var _0x29a9eb={'url':_0x4e76ff+_0x5167('0x33')+_0x41834e['username']+_0x5167('0x34')+_0x41834e[_0x5167('0x35')],'method':_0x5167('0x36')};rp(_0x29a9eb)[_0x5167('0x2a')](function(_0x2f2b0a){var _0x6a3822=_0x2f2b0a[_0x5167('0x37')](';');var _0x3cb385={'user_key':_0x6a3822[0x0],'session_key':_0x6a3822[0x1]};_0x29a9eb={'url':_0x4e76ff+'sms','method':_0x5167('0x38'),'headers':{'user_key':_0x3cb385[_0x5167('0x39')],'Session_key':_0x3cb385['session_key']},'json':!![],'body':_0x5a0a6e};return rp(_0x29a9eb);})[_0x5167('0x2a')](function(_0x5e30b4){if(_0x5e30b4['total_sent']>=0x1){var _0x4127fa={'messageId':_0x5e30b4['internal_order_id']};if(_0x41834e[_0x5167('0x31')]!=='GP'||!_0x41834e[_0x5167('0x3a')]){_0x4127fa[_0x5167('0x3b')]=!![];}return _0x356d8a[_0x5167('0x1a')](_0x4127fa);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x2f'),util['inspect'](_0x5e30b4,{'showHidden':![],'depth':null}));}})[_0x5167('0x1c')](function(_0x56a78a){return logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x2f'),util['inspect'](_0x56a78a,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),'skebby','Missing\x20parameters:\x20username,\x20password');}break;case'connectel':if(_0x41834e[_0x5167('0x23')]){var _0x3b4565={'recipient':_0x349893[_0x5167('0x24')],'message':_0x349893[_0x5167('0x27')],'sender':_0x41834e[_0x5167('0x3d')]||_0x41834e[_0x5167('0x24')],'authorization':_0x41834e[_0x5167('0x23')]};var _0x1751c4={'method':_0x5167('0x38'),'uri':_0x5167('0x3e'),'body':_0x3b4565,'json':!![]};rp(_0x1751c4)[_0x5167('0x2a')](function(_0x1a7ef1){var _0x1784c9={'messageId':_0x1a7ef1[_0x5167('0x3f')]};if(!_0x41834e['deliveryReport']){_0x1784c9['read']=!![];}return _0x356d8a[_0x5167('0x1a')](_0x1784c9);})['catch'](function(_0x49cf08){logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),'connectel',util['inspect'](_0x49cf08,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),'connectel',_0x5167('0x40'));}break;case _0x5167('0x41'):if(_0x41834e[_0x5167('0x42')]&&_0x41834e['password']){var _0x3b4565={'messages':[{'source':_0x5167('0x43'),'to':_0x349893[_0x5167('0x24')],'body':_0x349893['body'],'from':_0x41834e[_0x5167('0x3d')]||_0x41834e[_0x5167('0x24')]}]};var _0x42c40a=util['format'](_0x5167('0x44'),_0x41834e[_0x5167('0x42')],_0x41834e[_0x5167('0x35')]);var _0x1751c4={'method':_0x5167('0x38'),'uri':_0x5167('0x45'),'body':_0x3b4565,'headers':{'Authorization':util[_0x5167('0x46')](_0x5167('0x47'),new Buffer(_0x42c40a)[_0x5167('0x48')](_0x5167('0x49')))},'json':!![]};rp(_0x1751c4)[_0x5167('0x2a')](function(_0x328774){if(_0x328774[_0x5167('0x4a')]>=0xc8&&_0x328774[_0x5167('0x4a')]<=0xce){if(_0x328774[_0x5167('0x4b')]&&_0x328774[_0x5167('0x4b')][_0x5167('0x4c')]>0x0){var _0x699acd=_[_0x5167('0x4d')](_0x328774[_0x5167('0x4b')]['messages']);var _0x2054c1={'messageId':_0x699acd[_0x5167('0x4e')]};if(!_0x41834e['deliveryReport']){_0x2054c1['read']=!![];}return _0x356d8a[_0x5167('0x1a')](_0x2054c1);}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x4f'),util[_0x5167('0x2d')](_0x328774,{'showHidden':![],'depth':null}));}}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x4f'),util[_0x5167('0x2d')](_0x328774,{'showHidden':![],'depth':null}));}})[_0x5167('0x1c')](function(_0x1fe8d2){logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),'clickSend',util[_0x5167('0x2d')](_0x1fe8d2,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x4f'),_0x5167('0x50'));}break;case _0x5167('0x51'):if(_0x41834e[_0x5167('0x52')]&&_0x41834e[_0x5167('0x23')]){var _0x3b4565={'dst':_0x349893[_0x5167('0x24')],'text':_0x349893[_0x5167('0x27')],'src':_0x41834e[_0x5167('0x3d')]||_0x41834e[_0x5167('0x24')],'url':_0x41834e[_0x5167('0x53')]+_0x5167('0x28')+_0x349893['id']+_0x5167('0x29')+_0x41834e[_0x5167('0x54')]};var _0x42c40a=util[_0x5167('0x46')]('%s:%s',_0x41834e[_0x5167('0x52')],_0x41834e[_0x5167('0x23')]);var _0x1751c4={'method':_0x5167('0x38'),'uri':util[_0x5167('0x46')](_0x5167('0x55'),_0x41834e[_0x5167('0x52')]),'body':_0x3b4565,'headers':{'Authorization':util['format'](_0x5167('0x47'),new Buffer(_0x42c40a)[_0x5167('0x48')](_0x5167('0x49')))},'json':!![]};rp(_0x1751c4)[_0x5167('0x2a')](function(_0x188ff7){var _0x5835ac={'messageId':_0x188ff7['message_uuid'][0x0]};return _0x356d8a['update'](_0x5835ac);})['catch'](function(_0x427a88){logger['error'](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x51'),util[_0x5167('0x2d')](_0x427a88,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),'plivo',_0x5167('0x56'));}break;case _0x5167('0x57'):if(_0x41834e['username']&&_0x41834e[_0x5167('0x35')]){if(_0x41834e[_0x5167('0x58')]){var _0xd4ca2a={'method':'POST','uri':_0x41834e['baseUrl']+_0x5167('0x59'),'body':{'username':_0x41834e[_0x5167('0x42')],'password':_0x41834e['password']},'json':!![]};return rp(_0xd4ca2a)[_0x5167('0x2a')](function(_0x3a68da){var _0x1a86cd={'method':'POST','uri':_0x41834e[_0x5167('0x58')]+_0x5167('0x5a'),'body':{'messages':[{'from':_0x41834e[_0x5167('0x24')],'destinations':[{'to':_0x349893[_0x5167('0x24')]}],'text':_0x349893[_0x5167('0x27')],'notifyUrl':_0x41834e[_0x5167('0x53')]+_0x5167('0x28')+_0x349893['id']+_0x5167('0x29')+_0x41834e[_0x5167('0x54')],'notifyContentType':_0x5167('0x5b'),'callbackData':_0x41834e[_0x5167('0x24')]+';'+_0x349893['body']}]},'headers':{'Authorization':_0x5167('0x5c')+_0x3a68da[_0x5167('0x54')]},'json':!![]};return rp(_0x1a86cd)[_0x5167('0x2a')](function(_0x81d2f5){if(_0x81d2f5['messages']){var _0x298718={'messageId':_0x81d2f5[_0x5167('0x25')][0x0]['messageId']};if(!_0x41834e[_0x5167('0x3a')]){_0x298718[_0x5167('0x3b')]=!![];}return _0x356d8a[_0x5167('0x1a')](_0x298718);}else{return logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x57'),util[_0x5167('0x2d')](_0x81d2f5,{'showHidden':![],'depth':null}));}});})[_0x5167('0x1c')](function(_0x563f25){return logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),'infobip',util['inspect'](_0x563f25,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),'afterCreate','infobip',_0x5167('0x5d'));}}else{logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x57'),_0x5167('0x50'));}break;case _0x5167('0x5e'):var _0x16fac8=require(_0x5167('0x5f'));if(_0x41834e[_0x5167('0x60')]){var _0x292bed={};_0x292bed['login']=_0x41834e['username'];_0x292bed['phone']=_0x349893[_0x5167('0x24')];_0x292bed['sender']=_0x41834e[_0x5167('0x24')];_0x292bed[_0x5167('0x61')]=_0x349893[_0x5167('0x27')];_0x292bed[_0x5167('0x62')]=+new Date();var _0x517fd1='';var _0x14beb8='';var _0x4f1842=Object[_0x5167('0x63')](_0x292bed);_0x4f1842[_0x5167('0x64')]();for(var _0x39d195=0x0;_0x39d195<_0x4f1842[_0x5167('0x65')];_0x39d195++){if(_0x517fd1!=''){_0x517fd1+='&';}_0x517fd1+=_0x4f1842[_0x39d195]+'='+encodeURIComponent(_0x292bed[_0x4f1842[_0x39d195]]);_0x14beb8+=_0x292bed[_0x4f1842[_0x39d195]];}_0x14beb8+=_0x41834e[_0x5167('0x60')];_0x14beb8=_0x16fac8['createHash'](_0x5167('0x66'))[_0x5167('0x1a')](_0x14beb8)[_0x5167('0x67')](_0x5167('0x68'));if(_0x517fd1!==''){_0x517fd1+='&';}_0x517fd1+='signature='+_0x14beb8;var _0x29a9eb={'method':_0x5167('0x36'),'uri':_0x41834e[_0x5167('0x58')]+_0x5167('0x69')+_0x517fd1,'json':!![]};return rp(_0x29a9eb)[_0x5167('0x2a')](function(_0x49a6c7){var _0x291977=Object[_0x5167('0x63')](_0x49a6c7);if(_0x49a6c7[_0x291977[0x0]][_0x5167('0x1d')]&&parseInt(_0x49a6c7[_0x291977[0x0]][_0x5167('0x1d')])===0x0){var _0x1cff91={'messageId':_0x49a6c7[_0x291977[0x0]][_0x5167('0x6a')]};if(!_0x41834e['deliveryReport']){_0x1cff91['read']=!![];}return _0x356d8a[_0x5167('0x1a')](_0x1cff91);}else{return logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x5e'),util['inspect'](_0x49a6c7[_0x5167('0x1d')],{'showHidden':![],'depth':null}));}})[_0x5167('0x1c')](function(_0x2e5a55){return logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x5e'),util[_0x5167('0x2d')](_0x2e5a55,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),'csc',_0x5167('0x6b'));}break;case _0x5167('0x6c'):if(_0x41834e[_0x5167('0x60')]){var _0x38c6f4={'method':'POST','uri':'https://platform.clickatell.com/messages','headers':{'Authorization':_0x41834e[_0x5167('0x60')]},'body':{'content':_0x349893[_0x5167('0x27')],'to':[_0x349893[_0x5167('0x24')]],'from':_0x41834e[_0x5167('0x24')],'binary':![],'clientMessageId':_0x5167('0x6d'),'charset':'UTF-8'},'json':!![]};rp(_0x38c6f4)[_0x5167('0x2a')](function(_0x3310b5){if(!_0x3310b5[_0x5167('0x1d')]){var _0x857150={'messageId':_0x3310b5[_0x5167('0x25')][0x0][_0x5167('0x6e')]};if(!_0x41834e[_0x5167('0x3a')]){_0x857150[_0x5167('0x3b')]=!![];}return _0x356d8a['update'](_0x857150);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x6c'),util[_0x5167('0x2d')](_0x3310b5[_0x5167('0x1d')],{'showHidden':![],'depth':null}));}})[_0x5167('0x1c')](function(_0x4b0fef){return logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),'clickatell',util[_0x5167('0x2d')](_0x4b0fef,{'showHidden':![],'depth':null}));});}else{logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x6c'),'Missing\x20parameters:\x20apiKey');}break;case _0x5167('0x6f'):if(_0x41834e['username']&&_0x41834e[_0x5167('0x35')]){var _0x42c40a=util[_0x5167('0x46')](_0x5167('0x44'),_0x41834e[_0x5167('0x42')],_0x41834e[_0x5167('0x35')]);var _0x1751c4={'method':'POST','uri':_0x5167('0x70')+_0x41834e[_0x5167('0x71')]+_0x5167('0x72'),'body':{'to':[_0x349893[_0x5167('0x24')]],'text':_0x349893[_0x5167('0x27')],'from':_0x41834e[_0x5167('0x24')],'applicationId':_0x41834e[_0x5167('0x73')]},'headers':{'Authorization':util[_0x5167('0x46')](_0x5167('0x47'),new Buffer(_0x42c40a)[_0x5167('0x48')](_0x5167('0x49')))},'json':!![]};rp(_0x1751c4)[_0x5167('0x2a')](function(_0x28b09e){if(_0x28b09e['id']){var _0x13b0f0={'messageId':_0x28b09e['id']};return _0x356d8a[_0x5167('0x1a')](_0x13b0f0);}else{logger['error'](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x6f'),util[_0x5167('0x2d')](_0x28b09e,{'showHidden':![],'depth':null}));}})['catch'](function(_0x3a9a02){logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x6f'),util[_0x5167('0x2d')](_0x3a9a02,{'showHidden':![],'depth':null}));});}else{logger['error'](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x6f'),_0x5167('0x50'));}break;case _0x5167('0x74'):if(_0x41834e[_0x5167('0x60')]){var _0x4fb858={};var _0x29a9eb={'method':_0x5167('0x38'),'uri':_0x5167('0x75'),'headers':{'Authorization':_0x5167('0x76')+_0x41834e[_0x5167('0x60')],'Content-Type':'application/json'},'body':{'from':_0x41834e['phone'],'to':_0x349893[_0x5167('0x24')],'text':_0x349893[_0x5167('0x27')]},'json':!![]};return rp(_0x29a9eb)[_0x5167('0x2a')](function(_0x423c16){if(_0x423c16[_0x5167('0x77')]==0xca){_0x4fb858[_0x5167('0x78')]=_0x423c16;var _0x64be62={'method':_0x5167('0x38'),'uri':_0x5167('0x79'),'headers':{'Authorization':_0x5167('0x76')+_0x41834e[_0x5167('0x60')],'Content-Type':_0x5167('0x5b')},'body':{'refid':_0x4fb858[_0x5167('0x78')][_0x5167('0x7a')]},'json':!![]};return rp(_0x64be62)[_0x5167('0x2a')](function(_0x54bfb0){_0x4fb858[_0x5167('0x7b')]=_0x54bfb0;var _0x531f76={'messageId':_0x4fb858[_0x5167('0x78')]['refid'],'read':!![]};return _0x356d8a[_0x5167('0x1a')](_0x531f76);});}else{return logger['error'](_0x5167('0x3c'),_0x5167('0x2c'),'intelepeer',util[_0x5167('0x2d')](_0x423c16,{'showHidden':![],'depth':null}));}})['catch'](function(_0x5f06c1){return logger[_0x5167('0x1d')](_0x5167('0x3c'),_0x5167('0x2c'),_0x5167('0x74'),util[_0x5167('0x2d')](_0x5f06c1,{'showHidden':![],'depth':null}));});}else{return logger[_0x5167('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x5167('0x2c'),_0x5167('0x74'),_0x5167('0x7c'));}break;}}})[_0x5167('0x7d')](function(){_0x1f432a();});}else{_0x1f432a();}}},'charset':_0x5167('0x7e'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xff1f=['isNil','UserId','SmsInteractionId','findOne','update','createdAt','SmsAccount','find','twilio','accountSid','authToken','phone','messages','create','remote','/api/sms/messages/','/status?token=','token','then','sid','catch','error','SmsMessage,\x20%s,\x20%s,\x20%s','inspect','afterCreate','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','skebby','https://api.skebby.it/API/v1.0/REST/','smsMethod','sender','username','&password=','password','GET','sms','POST','user_key','session_key','internal_order_id','deliveryReport','read','Missing\x20parameters:\x20username,\x20password','senderString','https://smsapi.connectel.se/api/v2/send/','connectel','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','message_id','clickSend','plivo','authId','%s:%s','https://api.plivo.com/v1/Account/%s/Message/','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','keys','sort','length','createHash','md5','signature=','/external/get/send.php?','id_sms','clickatell','https://platform.clickatell.com/messages','uuid','UTF-8','apiMessageId','Missing\x20parameters:\x20apiKey','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/mdr','refid','status','message','Token\x20not\x20received','finally','utf8mb4','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','out','secret'];(function(_0x343e44,_0x519af9){var _0xa5130e=function(_0xae1fa0){while(--_0xae1fa0){_0x343e44['push'](_0x343e44['shift']());}};_0xa5130e(++_0x519af9);}(_0xff1f,0xe5));var _0xfff1=function(_0x231a47,_0x46a963){_0x231a47=_0x231a47-0x0;var _0x48d7c9=_0xff1f[_0x231a47];return _0x48d7c9;};'use strict';var _=require(_0xfff1('0x0'));var util=require(_0xfff1('0x1'));var logger=require(_0xfff1('0x2'))(_0xfff1('0x3'));var moment=require(_0xfff1('0x4'));var BPromise=require(_0xfff1('0x5'));var rp=require(_0xfff1('0x6'));var fs=require('fs');var path=require(_0xfff1('0x7'));var rimraf=require(_0xfff1('0x8'));var config=require(_0xfff1('0x9'));var attributes=require(_0xfff1('0xa'));module[_0xfff1('0xb')]=function(_0x128140,_0xd92b8e){return _0x128140[_0xfff1('0xc')](_0xfff1('0xd'),attributes,{'tableName':_0xfff1('0xe'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0xfff1('0xf')]},{'name':_0xfff1('0x10'),'fields':[_0xfff1('0x11')],'type':_0xfff1('0x12')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x471d5c,_0x59c950,_0x26aa8e){var _0x15183f=_0x128140[_0xfff1('0x13')];var _0x13b467=_0x471d5c[_0xfff1('0x14')]({'plain':!![]});if(_0x13b467['direction']['toLowerCase']()==='in'||_0x13b467[_0xfff1('0x15')][_0xfff1('0x16')]()===_0xfff1('0x17')&&!_0x13b467[_0xfff1('0x18')]&&!_[_0xfff1('0x19')](_0x13b467[_0xfff1('0x1a')])&&!_[_0xfff1('0x19')](_0x13b467[_0xfff1('0x1b')])){_0x15183f['SmsInteraction'][_0xfff1('0x1c')]({'where':{'id':_0x13b467['SmsInteractionId']}})['then'](function(_0x11656e){if(_0x11656e){_0x11656e[_0xfff1('0x1d')]({'lastMsgAt':_0x13b467[_0xfff1('0x1e')],'lastMsgDirection':_0x13b467[_0xfff1('0x15')]['toLowerCase']()});}})['catch'](function(_0x36467b){console['error'](_0x36467b);});}if(_0x13b467[_0xfff1('0x15')]===_0xfff1('0x17')&&!_0x13b467[_0xfff1('0x18')]){var _0x2ac716;_0x15183f[_0xfff1('0x1f')][_0xfff1('0x20')]({'where':{'id':_0x13b467['SmsAccountId']},'raw':!![]})['then'](function(_0x48ff87){_0x2ac716=_0x48ff87;if(_0x2ac716&&_0x2ac716['type']){switch(_0x2ac716['type']){case _0xfff1('0x21'):var _0x47e210=require(_0xfff1('0x21'));if(_0x2ac716[_0xfff1('0x22')]&&_0x2ac716[_0xfff1('0x23')]&&_0x2ac716[_0xfff1('0x24')]){var _0x53454c=new _0x47e210(_0x2ac716[_0xfff1('0x22')],_0x2ac716[_0xfff1('0x23')]);_0x53454c[_0xfff1('0x25')][_0xfff1('0x26')]({'body':_0x13b467['body'],'to':_0x13b467[_0xfff1('0x24')],'from':_0x2ac716[_0xfff1('0x24')],'statusCallback':_0x2ac716[_0xfff1('0x27')]+_0xfff1('0x28')+_0x13b467['id']+_0xfff1('0x29')+_0x2ac716[_0xfff1('0x2a')]})[_0xfff1('0x2b')](function(_0x163f85){if(_0x163f85[_0xfff1('0x2c')]){return _0x471d5c[_0xfff1('0x1d')]({'messageId':_0x163f85[_0xfff1('0x2c')]});}})[_0xfff1('0x2d')](function(_0x59e181){logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate',_0xfff1('0x21'),util[_0xfff1('0x30')](_0x59e181,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x21'),_0xfff1('0x32'));}break;case _0xfff1('0x33'):var _0x5e513d=_0xfff1('0x34');if(_0x2ac716['username']&&_0x2ac716['password']){var _0x4aa019={'recipient':[_0x13b467[_0xfff1('0x24')]],'message':_0x13b467[_0xfff1('0x11')],'message_type':_0x2ac716[_0xfff1('0x35')]};if(_0x2ac716[_0xfff1('0x35')]&&_0x2ac716[_0xfff1('0x35')]!=='SI'){_0x4aa019[_0xfff1('0x36')]=_0x2ac716[_0xfff1('0x24')];}var _0x11f5c4={'url':_0x5e513d+'login?username='+_0x2ac716[_0xfff1('0x37')]+_0xfff1('0x38')+_0x2ac716[_0xfff1('0x39')],'method':_0xfff1('0x3a')};rp(_0x11f5c4)['then'](function(_0x289a2b){var _0x40df1c=_0x289a2b['split'](';');var _0x671698={'user_key':_0x40df1c[0x0],'session_key':_0x40df1c[0x1]};_0x11f5c4={'url':_0x5e513d+_0xfff1('0x3b'),'method':_0xfff1('0x3c'),'headers':{'user_key':_0x671698[_0xfff1('0x3d')],'Session_key':_0x671698[_0xfff1('0x3e')]},'json':!![],'body':_0x4aa019};return rp(_0x11f5c4);})['then'](function(_0x102118){if(_0x102118['total_sent']>=0x1){var _0x4d6b20={'messageId':_0x102118[_0xfff1('0x3f')]};if(_0x2ac716[_0xfff1('0x35')]!=='GP'||!_0x2ac716[_0xfff1('0x40')]){_0x4d6b20[_0xfff1('0x41')]=!![];}return _0x471d5c[_0xfff1('0x1d')](_0x4d6b20);}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),'skebby',util[_0xfff1('0x30')](_0x102118,{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0x41dd30){return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x33'),util[_0xfff1('0x30')](_0x41dd30,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x33'),_0xfff1('0x42'));}break;case'connectel':if(_0x2ac716[_0xfff1('0x23')]){var _0x374783={'recipient':_0x13b467[_0xfff1('0x24')],'message':_0x13b467[_0xfff1('0x11')],'sender':_0x2ac716[_0xfff1('0x43')]||_0x2ac716[_0xfff1('0x24')],'authorization':_0x2ac716[_0xfff1('0x23')]};var _0x59c950={'method':_0xfff1('0x3c'),'uri':_0xfff1('0x44'),'body':_0x374783,'json':!![]};rp(_0x59c950)[_0xfff1('0x2b')](function(_0x3b0815){var _0x13715e={'messageId':_0x3b0815['requestid']};if(!_0x2ac716['deliveryReport']){_0x13715e['read']=!![];}return _0x471d5c[_0xfff1('0x1d')](_0x13715e);})[_0xfff1('0x2d')](function(_0x2c3867){logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x45'),util[_0xfff1('0x30')](_0x2c3867,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x45'),_0xfff1('0x46'));}break;case _0xfff1('0x47'):if(_0x2ac716[_0xfff1('0x37')]&&_0x2ac716[_0xfff1('0x39')]){var _0x374783={'messages':[{'source':_0xfff1('0x48'),'to':_0x13b467[_0xfff1('0x24')],'body':_0x13b467['body'],'from':_0x2ac716[_0xfff1('0x43')]||_0x2ac716['phone']}]};var _0x449257=util[_0xfff1('0x49')]('%s:%s',_0x2ac716[_0xfff1('0x37')],_0x2ac716['password']);var _0x59c950={'method':'POST','uri':_0xfff1('0x4a'),'body':_0x374783,'headers':{'Authorization':util['format'](_0xfff1('0x4b'),new Buffer(_0x449257)[_0xfff1('0x4c')](_0xfff1('0x4d')))},'json':!![]};rp(_0x59c950)[_0xfff1('0x2b')](function(_0x915f6d){if(_0x915f6d[_0xfff1('0x4e')]>=0xc8&&_0x915f6d[_0xfff1('0x4e')]<=0xce){if(_0x915f6d[_0xfff1('0x4f')]&&_0x915f6d['data'][_0xfff1('0x50')]>0x0){var _0x1fa1a9=_['head'](_0x915f6d[_0xfff1('0x4f')][_0xfff1('0x25')]);var _0x3ff784={'messageId':_0x1fa1a9[_0xfff1('0x51')]};if(!_0x2ac716['deliveryReport']){_0x3ff784['read']=!![];}return _0x471d5c['update'](_0x3ff784);}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate',_0xfff1('0x52'),util[_0xfff1('0x30')](_0x915f6d,{'showHidden':![],'depth':null}));}}else{logger['error'](_0xfff1('0x2f'),'afterCreate','clickSend',util[_0xfff1('0x30')](_0x915f6d,{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0x1f0f70){logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x52'),util[_0xfff1('0x30')](_0x1f0f70,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfff1('0x31'),_0xfff1('0x52'),_0xfff1('0x42'));}break;case _0xfff1('0x53'):if(_0x2ac716[_0xfff1('0x54')]&&_0x2ac716['authToken']){var _0x374783={'dst':_0x13b467['phone'],'text':_0x13b467[_0xfff1('0x11')],'src':_0x2ac716[_0xfff1('0x43')]||_0x2ac716[_0xfff1('0x24')],'url':_0x2ac716[_0xfff1('0x27')]+_0xfff1('0x28')+_0x13b467['id']+'/status?token='+_0x2ac716[_0xfff1('0x2a')]};var _0x449257=util[_0xfff1('0x49')](_0xfff1('0x55'),_0x2ac716[_0xfff1('0x54')],_0x2ac716['authToken']);var _0x59c950={'method':'POST','uri':util[_0xfff1('0x49')](_0xfff1('0x56'),_0x2ac716[_0xfff1('0x54')]),'body':_0x374783,'headers':{'Authorization':util[_0xfff1('0x49')](_0xfff1('0x4b'),new Buffer(_0x449257)[_0xfff1('0x4c')]('base64'))},'json':!![]};rp(_0x59c950)[_0xfff1('0x2b')](function(_0x519bd7){var _0x506ddf={'messageId':_0x519bd7[_0xfff1('0x57')][0x0]};return _0x471d5c['update'](_0x506ddf);})[_0xfff1('0x2d')](function(_0x53b16d){logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate',_0xfff1('0x53'),util[_0xfff1('0x30')](_0x53b16d,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate',_0xfff1('0x53'),_0xfff1('0x58'));}break;case _0xfff1('0x59'):if(_0x2ac716[_0xfff1('0x37')]&&_0x2ac716[_0xfff1('0x39')]){if(_0x2ac716[_0xfff1('0x5a')]){var _0x785ec7={'method':'POST','uri':_0x2ac716[_0xfff1('0x5a')]+'/auth/1/session','body':{'username':_0x2ac716[_0xfff1('0x37')],'password':_0x2ac716[_0xfff1('0x39')]},'json':!![]};return rp(_0x785ec7)[_0xfff1('0x2b')](function(_0x46c8a4){var _0x237d16={'method':'POST','uri':_0x2ac716['baseUrl']+_0xfff1('0x5b'),'body':{'messages':[{'from':_0x2ac716[_0xfff1('0x24')],'destinations':[{'to':_0x13b467[_0xfff1('0x24')]}],'text':_0x13b467[_0xfff1('0x11')],'notifyUrl':_0x2ac716[_0xfff1('0x27')]+'/api/sms/messages/'+_0x13b467['id']+_0xfff1('0x29')+_0x2ac716[_0xfff1('0x2a')],'notifyContentType':_0xfff1('0x5c'),'callbackData':_0x2ac716[_0xfff1('0x24')]+';'+_0x13b467[_0xfff1('0x11')]}]},'headers':{'Authorization':_0xfff1('0x5d')+_0x46c8a4[_0xfff1('0x2a')]},'json':!![]};return rp(_0x237d16)[_0xfff1('0x2b')](function(_0x379c4d){if(_0x379c4d[_0xfff1('0x25')]){var _0x214c6a={'messageId':_0x379c4d[_0xfff1('0x25')][0x0][_0xfff1('0xf')]};if(!_0x2ac716['deliveryReport']){_0x214c6a['read']=!![];}return _0x471d5c[_0xfff1('0x1d')](_0x214c6a);}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x59'),util[_0xfff1('0x30')](_0x379c4d,{'showHidden':![],'depth':null}));}});})['catch'](function(_0x3891f9){return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),'infobip',util['inspect'](_0x3891f9,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x59'),_0xfff1('0x5e'));}}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x59'),_0xfff1('0x42'));}break;case _0xfff1('0x5f'):var _0x48fd95=require(_0xfff1('0x60'));if(_0x2ac716[_0xfff1('0x61')]){var _0x3414b7={};_0x3414b7[_0xfff1('0x62')]=_0x2ac716['username'];_0x3414b7[_0xfff1('0x24')]=_0x13b467['phone'];_0x3414b7[_0xfff1('0x36')]=_0x2ac716[_0xfff1('0x24')];_0x3414b7[_0xfff1('0x63')]=_0x13b467[_0xfff1('0x11')];_0x3414b7['timestamp']=+new Date();var _0x357e41='';var _0x51dde2='';var _0x303c96=Object[_0xfff1('0x64')](_0x3414b7);_0x303c96[_0xfff1('0x65')]();for(var _0x527506=0x0;_0x527506<_0x303c96[_0xfff1('0x66')];_0x527506++){if(_0x357e41!=''){_0x357e41+='&';}_0x357e41+=_0x303c96[_0x527506]+'='+encodeURIComponent(_0x3414b7[_0x303c96[_0x527506]]);_0x51dde2+=_0x3414b7[_0x303c96[_0x527506]];}_0x51dde2+=_0x2ac716['apiKey'];_0x51dde2=_0x48fd95[_0xfff1('0x67')](_0xfff1('0x68'))[_0xfff1('0x1d')](_0x51dde2)['digest']('hex');if(_0x357e41!==''){_0x357e41+='&';}_0x357e41+=_0xfff1('0x69')+_0x51dde2;var _0x11f5c4={'method':_0xfff1('0x3a'),'uri':_0x2ac716[_0xfff1('0x5a')]+_0xfff1('0x6a')+_0x357e41,'json':!![]};return rp(_0x11f5c4)['then'](function(_0x302047){var _0x5b8798=Object[_0xfff1('0x64')](_0x302047);if(_0x302047[_0x5b8798[0x0]][_0xfff1('0x2e')]&&parseInt(_0x302047[_0x5b8798[0x0]][_0xfff1('0x2e')])===0x0){var _0x849409={'messageId':_0x302047[_0x5b8798[0x0]][_0xfff1('0x6b')]};if(!_0x2ac716[_0xfff1('0x40')]){_0x849409[_0xfff1('0x41')]=!![];}return _0x471d5c[_0xfff1('0x1d')](_0x849409);}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x5f'),util['inspect'](_0x302047[_0xfff1('0x2e')],{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0xc66d07){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfff1('0x31'),_0xfff1('0x5f'),util[_0xfff1('0x30')](_0xc66d07,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfff1('0x31'),_0xfff1('0x5f'),'Missing\x20parameters:\x20apiKey');}break;case _0xfff1('0x6c'):if(_0x2ac716['apiKey']){var _0x2054bd={'method':_0xfff1('0x3c'),'uri':_0xfff1('0x6d'),'headers':{'Authorization':_0x2ac716[_0xfff1('0x61')]},'body':{'content':_0x13b467[_0xfff1('0x11')],'to':[_0x13b467['phone']],'from':_0x2ac716[_0xfff1('0x24')],'binary':![],'clientMessageId':_0xfff1('0x6e'),'charset':_0xfff1('0x6f')},'json':!![]};rp(_0x2054bd)[_0xfff1('0x2b')](function(_0x52073f){if(!_0x52073f[_0xfff1('0x2e')]){var _0x46aff7={'messageId':_0x52073f[_0xfff1('0x25')][0x0][_0xfff1('0x70')]};if(!_0x2ac716[_0xfff1('0x40')]){_0x46aff7[_0xfff1('0x41')]=!![];}return _0x471d5c[_0xfff1('0x1d')](_0x46aff7);}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),'clickatell',util[_0xfff1('0x30')](_0x52073f[_0xfff1('0x2e')],{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0x32847a){return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x6c'),util['inspect'](_0x32847a,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x6c'),_0xfff1('0x71'));}break;case _0xfff1('0x72'):if(_0x2ac716[_0xfff1('0x37')]&&_0x2ac716['password']){var _0x449257=util[_0xfff1('0x49')](_0xfff1('0x55'),_0x2ac716[_0xfff1('0x37')],_0x2ac716['password']);var _0x59c950={'method':'POST','uri':_0xfff1('0x73')+_0x2ac716[_0xfff1('0x74')]+_0xfff1('0x75'),'body':{'to':[_0x13b467[_0xfff1('0x24')]],'text':_0x13b467[_0xfff1('0x11')],'from':_0x2ac716[_0xfff1('0x24')],'applicationId':_0x2ac716['applicationId']},'headers':{'Authorization':util[_0xfff1('0x49')]('Basic\x20%s',new Buffer(_0x449257)[_0xfff1('0x4c')](_0xfff1('0x4d')))},'json':!![]};rp(_0x59c950)['then'](function(_0x4ffc00){if(_0x4ffc00['id']){var _0x348853={'messageId':_0x4ffc00['id']};return _0x471d5c['update'](_0x348853);}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfff1('0x31'),_0xfff1('0x72'),util[_0xfff1('0x30')](_0x4ffc00,{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0x721ded){logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate','bandwidth',util[_0xfff1('0x30')](_0x721ded,{'showHidden':![],'depth':null}));});}else{logger[_0xfff1('0x2e')](_0xfff1('0x2f'),'afterCreate',_0xfff1('0x72'),_0xfff1('0x42'));}break;case _0xfff1('0x76'):if(_0x2ac716['apiKey']){var _0x5298e4={};var _0x11f5c4={'method':_0xfff1('0x3c'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/send','headers':{'Authorization':'Bearer\x20'+_0x2ac716[_0xfff1('0x61')],'Content-Type':'application/json'},'body':{'from':_0x2ac716[_0xfff1('0x24')],'to':_0x13b467['phone'],'text':_0x13b467[_0xfff1('0x11')]},'json':!![]};return rp(_0x11f5c4)[_0xfff1('0x2b')](function(_0x15b735){if(_0x15b735['code']==0xca){_0x5298e4['message']=_0x15b735;var _0x156517={'method':_0xfff1('0x3c'),'uri':_0xfff1('0x77'),'headers':{'Authorization':'Bearer\x20'+_0x2ac716[_0xfff1('0x61')],'Content-Type':_0xfff1('0x5c')},'body':{'refid':_0x5298e4['message'][_0xfff1('0x78')]},'json':!![]};return rp(_0x156517)[_0xfff1('0x2b')](function(_0x15288c){_0x5298e4[_0xfff1('0x79')]=_0x15288c;var _0x4414ed={'messageId':_0x5298e4[_0xfff1('0x7a')]['refid'],'read':!![]};return _0x471d5c['update'](_0x4414ed);});}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),_0xfff1('0x76'),util[_0xfff1('0x30')](_0x15b735,{'showHidden':![],'depth':null}));}})[_0xfff1('0x2d')](function(_0xc25bf){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xfff1('0x31'),_0xfff1('0x76'),util[_0xfff1('0x30')](_0xc25bf,{'showHidden':![],'depth':null}));});}else{return logger[_0xfff1('0x2e')](_0xfff1('0x2f'),_0xfff1('0x31'),'intelepeer',_0xfff1('0x7b'));}break;}}})[_0xfff1('0x7c')](function(){_0x26aa8e();});}else{_0x26aa8e();}}},'charset':_0xfff1('0x7d'),'collate':_0xfff1('0x7e')});};
\ No newline at end of file