f80bc487c57d5e7fbf99cb1e2c24c4ef0f3f152b
[motion2.git] / server / api / openchannelMessage / openchannelMessage.controller.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and   *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0x321b=['redis','defaults','localhost','socket.io-emitter','./openchannelMessage.socket','register','jayson/promise','client','http','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','destroy','end','stack','name','send','map','OpenchannelMessage','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','sort','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','find','create','body','params','describe','accept','openchannel','YYYY-MM-DD\x20HH:mm:ss','UserId','get','OpenchannelInteraction','OpenchannelInteractionId','interaction','user','role','null','acceptMessage','sequelize','Sequelize','contact','User','fullname','email','internal','agent','manual','SIP/%s','channel','event','EventManager','openchannel-interactions','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','QueryTypes','SELECT','format','motionChannel','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x519c72,_0x4baade){var _0x2f879f=function(_0x48978f){while(--_0x48978f){_0x519c72['push'](_0x519c72['shift']());}};_0x2f879f(++_0x4baade);}(_0x321b,0x161));var _0xb321=function(_0x251e82,_0x1d3fea){_0x251e82=_0x251e82-0x0;var _0x1d97ea=_0x321b[_0x251e82];return _0x1d97ea;};'use strict';var emlformat=require(_0xb321('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xb321('0x1'));var jsonpatch=require(_0xb321('0x2'));var rp=require('request-promise');var moment=require(_0xb321('0x3'));var BPromise=require(_0xb321('0x4'));var Mustache=require(_0xb321('0x5'));var util=require(_0xb321('0x6'));var path=require(_0xb321('0x7'));var sox=require(_0xb321('0x8'));var csv=require(_0xb321('0x9'));var ejs=require(_0xb321('0xa'));var fs=require('fs');var fs_extra=require(_0xb321('0xb'));var _=require(_0xb321('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xb321('0xd'));var deskjs=require(_0xb321('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xb321('0xf'));var Redis=require(_0xb321('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xb321('0x11'));var hardwareService=require(_0xb321('0x12'));var logger=require(_0xb321('0x13'))(_0xb321('0x14'));var utils=require(_0xb321('0x15'));var config=require(_0xb321('0x16'));var licenseUtil=require(_0xb321('0x17'));var db=require(_0xb321('0x18'))['db'];config[_0xb321('0x19')]=_[_0xb321('0x1a')](config[_0xb321('0x19')],{'host':_0xb321('0x1b'),'port':0x18eb});var socket=require(_0xb321('0x1c'))(new Redis(config[_0xb321('0x19')]));require(_0xb321('0x1d'))[_0xb321('0x1e')](socket);var jayson=require(_0xb321('0x1f'));var client=jayson[_0xb321('0x20')][_0xb321('0x21')]({'port':0x232c});var client9002=jayson[_0xb321('0x20')][_0xb321('0x21')]({'port':0x232a});function respondWithRpcPromise(_0x3d2c19,_0x22cba9,_0xe60ad0,_0x938e02){return new BPromise(function(_0x5c2171,_0x4208bc){var _0x584431=_0x938e02||client;return _0x584431['request'](_0x3d2c19,_0xe60ad0)[_0xb321('0x22')](function(_0x5d3266){logger[_0xb321('0x23')](_0xb321('0x24'),_0x22cba9,_0xb321('0x25'));logger['debug'](_0xb321('0x26'),_0x22cba9,'request\x20sent',JSON[_0xb321('0x27')](_0x5d3266));if(_0x5d3266['error']){if(_0x5d3266[_0xb321('0x28')]['code']===0x1f4){logger['error'](_0xb321('0x24'),_0x22cba9,_0x5d3266[_0xb321('0x28')][_0xb321('0x29')]);return _0x4208bc(_0x5d3266['error'][_0xb321('0x29')]);}logger['error'](_0xb321('0x24'),_0x22cba9,_0x5d3266[_0xb321('0x28')][_0xb321('0x29')]);return _0x5c2171(_0x5d3266[_0xb321('0x28')][_0xb321('0x29')]);}else{logger[_0xb321('0x23')](_0xb321('0x24'),_0x22cba9,_0xb321('0x25'));_0x5c2171(_0x5d3266[_0xb321('0x2a')][_0xb321('0x29')]);}})[_0xb321('0x2b')](function(_0x176bc2){logger[_0xb321('0x28')](_0xb321('0x24'),_0x22cba9,_0x176bc2);_0x4208bc(_0x176bc2);});});}function respondWithStatusCode(_0x2177e4,_0x8e9379){_0x8e9379=_0x8e9379||0xcc;return function(_0x422caa){if(_0x422caa){return _0x2177e4[_0xb321('0x2c')](_0x8e9379);}return _0x2177e4[_0xb321('0x2d')](_0x8e9379)['end']();};}function respondWithResult(_0x1a6e02,_0x4fbeb7){_0x4fbeb7=_0x4fbeb7||0xc8;return function(_0x3145d9){if(_0x3145d9){return _0x1a6e02[_0xb321('0x2d')](_0x4fbeb7)[_0xb321('0x2e')](_0x3145d9);}};}function respondWithFilteredResult(_0x4483a7,_0x3998a9){return function(_0x38b025){if(_0x38b025){var _0x20fc54=typeof _0x3998a9[_0xb321('0x2f')]==='undefined'&&typeof _0x3998a9[_0xb321('0x30')]===_0xb321('0x31');var _0x1c5b83=_0x38b025[_0xb321('0x32')];var _0x87225e=_0x20fc54?0x0:_0x3998a9[_0xb321('0x2f')];var _0x39f92d=_0x20fc54?_0x38b025['count']:_0x3998a9[_0xb321('0x2f')]+_0x3998a9[_0xb321('0x30')];var _0x9bb5f0;if(_0x39f92d>=_0x1c5b83){_0x39f92d=_0x1c5b83;_0x9bb5f0=0xc8;}else{_0x9bb5f0=0xce;}_0x4483a7[_0xb321('0x2d')](_0x9bb5f0);return _0x4483a7[_0xb321('0x33')](_0xb321('0x34'),_0x87225e+'-'+_0x39f92d+'/'+_0x1c5b83)[_0xb321('0x2e')](_0x38b025);}return null;};}function patchUpdates(_0x30d7b8){return function(_0x315b4e){try{jsonpatch[_0xb321('0x35')](_0x315b4e,_0x30d7b8,!![]);}catch(_0x264ac3){return BPromise[_0xb321('0x36')](_0x264ac3);}return _0x315b4e[_0xb321('0x37')]();};}function saveUpdates(_0xebd403,_0x51de42){return function(_0x294292){if(_0x294292){return _0x294292[_0xb321('0x38')](_0xebd403)['then'](function(_0x404419){return _0x404419;});}return null;};}function removeEntity(_0x29a439,_0x3510f9){return function(_0x2eff40){if(_0x2eff40){return _0x2eff40[_0xb321('0x39')]()[_0xb321('0x22')](function(){_0x29a439[_0xb321('0x2d')](0xcc)[_0xb321('0x3a')]();});}};}function handleEntityNotFound(_0x1cfec2,_0x1f543e){return function(_0x51b52a){if(!_0x51b52a){_0x1cfec2[_0xb321('0x2c')](0x194);}return _0x51b52a;};}function handleError(_0x39c58,_0x1e4f6c){_0x1e4f6c=_0x1e4f6c||0x1f4;return function(_0x58dab3){logger[_0xb321('0x28')](_0x58dab3[_0xb321('0x3b')]);if(_0x58dab3[_0xb321('0x3c')]){delete _0x58dab3[_0xb321('0x3c')];}_0x39c58[_0xb321('0x2d')](_0x1e4f6c)[_0xb321('0x3d')](_0x58dab3);};}exports['index']=function(_0x1d343e,_0x213e78){var _0x3d088b={},_0x158f07={},_0x561c1a={'count':0x0,'rows':[]};var _0x39a9c4=_[_0xb321('0x3e')](db[_0xb321('0x3f')][_0xb321('0x40')],function(_0x85d9ba){return{'name':_0x85d9ba[_0xb321('0x41')],'type':_0x85d9ba[_0xb321('0x42')][_0xb321('0x43')]};});_0x158f07[_0xb321('0x44')]=_[_0xb321('0x3e')](_0x39a9c4,_0xb321('0x3c'));_0x158f07[_0xb321('0x45')]=_[_0xb321('0x46')](_0x1d343e[_0xb321('0x45')]);_0x158f07[_0xb321('0x47')]=_['intersection'](_0x158f07[_0xb321('0x44')],_0x158f07[_0xb321('0x45')]);_0x3d088b['attributes']=_[_0xb321('0x48')](_0x158f07[_0xb321('0x44')],qs['fields'](_0x1d343e['query'][_0xb321('0x49')]));_0x3d088b[_0xb321('0x4a')]=_0x3d088b[_0xb321('0x4a')][_0xb321('0x4b')]?_0x3d088b['attributes']:_0x158f07['model'];if(!_0x1d343e[_0xb321('0x45')][_0xb321('0x4c')]('nolimit')){_0x3d088b[_0xb321('0x30')]=qs['limit'](_0x1d343e[_0xb321('0x45')][_0xb321('0x30')]);_0x3d088b[_0xb321('0x2f')]=qs[_0xb321('0x2f')](_0x1d343e[_0xb321('0x45')]['offset']);}_0x3d088b['order']=qs[_0xb321('0x4d')](_0x1d343e[_0xb321('0x45')][_0xb321('0x4d')]);_0x3d088b['where']=qs[_0xb321('0x47')](_['pick'](_0x1d343e[_0xb321('0x45')],_0x158f07[_0xb321('0x47')]),_0x39a9c4);if(_0x1d343e[_0xb321('0x45')][_0xb321('0x4e')]){_0x3d088b[_0xb321('0x4f')]=_[_0xb321('0x50')](_0x3d088b['where'],{'$or':_[_0xb321('0x3e')](_0x39a9c4,function(_0x11be6a){if(_0x11be6a[_0xb321('0x42')]!==_0xb321('0x51')){var _0x4d5180={};_0x4d5180[_0x11be6a[_0xb321('0x3c')]]={'$like':'%'+_0x1d343e[_0xb321('0x45')][_0xb321('0x4e')]+'%'};return _0x4d5180;}})});}_0x3d088b=_[_0xb321('0x50')]({},_0x3d088b,_0x1d343e[_0xb321('0x52')]);var _0x3f5598={'where':_0x3d088b[_0xb321('0x4f')]};return db[_0xb321('0x3f')][_0xb321('0x32')](_0x3f5598)[_0xb321('0x22')](function(_0x142a4b){_0x561c1a[_0xb321('0x32')]=_0x142a4b;if(_0x1d343e[_0xb321('0x45')][_0xb321('0x53')]){_0x3d088b[_0xb321('0x54')]=[{'all':!![]}];}return db[_0xb321('0x3f')][_0xb321('0x55')](_0x3d088b);})[_0xb321('0x22')](function(_0x40ab2e){_0x561c1a['rows']=_0x40ab2e;return _0x561c1a;})['then'](respondWithFilteredResult(_0x213e78,_0x3d088b))['catch'](handleError(_0x213e78,null));};exports['show']=function(_0x5c1573,_0x5bdf2b){var _0x10ff6a={'raw':!![],'where':{'id':_0x5c1573['params']['id']}},_0x1d5d95={};_0x1d5d95['model']=_[_0xb321('0x46')](db['OpenchannelMessage'][_0xb321('0x40')]);_0x1d5d95[_0xb321('0x45')]=_['keys'](_0x5c1573[_0xb321('0x45')]);_0x1d5d95[_0xb321('0x47')]=_[_0xb321('0x48')](_0x1d5d95['model'],_0x1d5d95[_0xb321('0x45')]);_0x10ff6a['attributes']=_[_0xb321('0x48')](_0x1d5d95[_0xb321('0x44')],qs[_0xb321('0x49')](_0x5c1573[_0xb321('0x45')][_0xb321('0x49')]));_0x10ff6a[_0xb321('0x4a')]=_0x10ff6a[_0xb321('0x4a')]['length']?_0x10ff6a[_0xb321('0x4a')]:_0x1d5d95['model'];if(_0x5c1573[_0xb321('0x45')]['includeAll']){_0x10ff6a[_0xb321('0x54')]=[{'all':!![]}];}_0x10ff6a=_[_0xb321('0x50')]({},_0x10ff6a,_0x5c1573[_0xb321('0x52')]);return db[_0xb321('0x3f')][_0xb321('0x56')](_0x10ff6a)[_0xb321('0x22')](handleEntityNotFound(_0x5bdf2b,null))[_0xb321('0x22')](respondWithResult(_0x5bdf2b,null))['catch'](handleError(_0x5bdf2b,null));};exports[_0xb321('0x57')]=function(_0x40da31,_0x2ce66d){return db[_0xb321('0x3f')][_0xb321('0x57')](_0x40da31[_0xb321('0x58')],{})[_0xb321('0x22')](respondWithResult(_0x2ce66d,0xc9))[_0xb321('0x2b')](handleError(_0x2ce66d,null));};exports['update']=function(_0x6cbfce,_0x3c1f9a){if(_0x6cbfce[_0xb321('0x58')]['id']){delete _0x6cbfce[_0xb321('0x58')]['id'];}return db[_0xb321('0x3f')][_0xb321('0x56')]({'where':{'id':_0x6cbfce[_0xb321('0x59')]['id']}})[_0xb321('0x22')](handleEntityNotFound(_0x3c1f9a,null))['then'](saveUpdates(_0x6cbfce[_0xb321('0x58')],null))['then'](respondWithResult(_0x3c1f9a,null))[_0xb321('0x2b')](handleError(_0x3c1f9a,null));};exports[_0xb321('0x39')]=function(_0x1a6742,_0x25e2e3){return db[_0xb321('0x3f')][_0xb321('0x56')]({'where':{'id':_0x1a6742[_0xb321('0x59')]['id']}})[_0xb321('0x22')](handleEntityNotFound(_0x25e2e3,null))['then'](removeEntity(_0x25e2e3,null))[_0xb321('0x2b')](handleError(_0x25e2e3,null));};exports['describe']=function(_0x1de266,_0x30ebdc){return db[_0xb321('0x3f')][_0xb321('0x5a')]()[_0xb321('0x22')](respondWithResult(_0x30ebdc,null))[_0xb321('0x2b')](handleError(_0x30ebdc,null));};var interaction_log=require(_0xb321('0x13'))('openchannel-interactions');exports[_0xb321('0x5b')]=function(_0x29cd78,_0x116988,_0x437313){var _0x4ece14={'agent':{},'channel':_0xb321('0x5c')};if(_0x29cd78[_0xb321('0x58')]['id']){delete _0x29cd78[_0xb321('0x58')]['id'];}_0x29cd78['body']['read']=!![];_0x29cd78[_0xb321('0x58')]['readAt']=moment()['format'](_0xb321('0x5d'));_0x29cd78['body'][_0xb321('0x5e')]=_0x29cd78[_0xb321('0x58')][_0xb321('0x5e')]||_0x29cd78['user']['id'];_0x4ece14['agent']['id']=_0x29cd78[_0xb321('0x58')][_0xb321('0x5e')];return db[_0xb321('0x3f')][_0xb321('0x56')]({'where':{'id':_0x29cd78[_0xb321('0x59')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x116988,null))[_0xb321('0x22')](saveUpdates(_0x29cd78[_0xb321('0x58')],null))[_0xb321('0x22')](function(_0x48965d){if(_0x48965d){_0x4ece14[_0xb321('0x29')]=_0x48965d[_0xb321('0x5f')]({'plain':!![]});return db[_0xb321('0x60')]['find']({'where':{'id':_0x48965d[_0xb321('0x61')]}});}return null;})[_0xb321('0x22')](handleEntityNotFound(_0x116988,null))[_0xb321('0x22')](function(_0x3f2adc){if(_0x3f2adc){return _0x3f2adc[_0xb321('0x38')]({'UserId':_0x29cd78[_0xb321('0x58')][_0xb321('0x5e')],'read1stAt':_['isNil'](_0x3f2adc['read1stAt'])?moment()['format'](_0xb321('0x5d')):undefined});}return null;})['then'](function(_0x2421eb){if(_0x2421eb){_0x4ece14[_0xb321('0x62')]=_0x2421eb[_0xb321('0x5f')]({'plain':!![]});interaction_log[_0xb321('0x23')]('[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x29cd78[_0xb321('0x63')]['id'],_0x29cd78[_0xb321('0x63')][_0xb321('0x3c')],_0x29cd78[_0xb321('0x63')][_0xb321('0x64')],_0x4ece14['interaction']['id'],_0x29cd78[_0xb321('0x58')]?JSON['stringify'](_0x29cd78[_0xb321('0x58')]):_0xb321('0x65'));return respondWithRpcPromise('AcceptMessage',_0xb321('0x66'),_0x4ece14);}return null;})[_0xb321('0x22')](function(_0x26e279){var _0x4ba64e='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x26e279[_0xb321('0x29')]['ContactId'];return db[_0xb321('0x67')]['query'](_0x4ba64e,{'type':db[_0xb321('0x68')]['QueryTypes']['SELECT'],'raw':!![]})[_0xb321('0x22')](function(_0x54f039){return _0x54f039;});})[_0xb321('0x22')](function(_0x5172ec){if(_0x5172ec){_0x4ece14[_0xb321('0x29')][_0xb321('0x69')]=_0x5172ec[0x0];if(!_0x29cd78[_0xb321('0x58')][_0xb321('0x5e')])return;return db[_0xb321('0x6a')][_0xb321('0x56')]({'where':{'id':_0x29cd78['body'][_0xb321('0x5e')],'role':'agent'},'attributes':['id',_0xb321('0x3c'),_0xb321('0x6b'),_0xb321('0x6c'),_0xb321('0x6d')],'raw':!![]});}return null;})[_0xb321('0x22')](function(_0x2afa67){if(!_0x2afa67)return null;_0x4ece14[_0xb321('0x29')][_0xb321('0x6e')]=_0x2afa67;return _0x4ece14;})[_0xb321('0x22')](function(_0x132df7){if(_0x132df7){if(_0x29cd78[_0xb321('0x58')][_0xb321('0x6f')]){_0x4ece14['message']['interface']=util['format'](_0xb321('0x70'),_0x29cd78[_0xb321('0x63')]['name']);_0x4ece14[_0xb321('0x29')][_0xb321('0x71')]=_0x4ece14[_0xb321('0x71')];_0x4ece14[_0xb321('0x29')]['motionChannel']=_0x4ece14['channel'];_0x4ece14[_0xb321('0x29')][_0xb321('0x72')]=_0xb321('0x5b');return respondWithRpcPromise(_0xb321('0x73'),_0xb321('0x73'),{'event':'acceptmessage','message':_0x4ece14[_0xb321('0x29')]},client9002)[_0xb321('0x22')](function(){return _0x4ece14;});}return _0x4ece14;}return null;})[_0xb321('0x22')](respondWithResult(_0x116988,null))[_0xb321('0x2b')](handleError(_0x116988,null));};var interaction_log=require('../../config/logger')(_0xb321('0x74'));exports['reject']=function(_0x1d1f03,_0x541ca7,_0x4d44b0){var _0x52f6a6={'agent':{},'channel':'openchannel'};if(_0x1d1f03[_0xb321('0x58')]['id']){delete _0x1d1f03['body']['id'];}_0x1d1f03[_0xb321('0x58')]['UserId']=_0x1d1f03[_0xb321('0x58')][_0xb321('0x5e')]||_0x1d1f03['user']['id'];_0x52f6a6['agent']['id']=_0x1d1f03[_0xb321('0x58')][_0xb321('0x5e')];return db['OpenchannelMessage'][_0xb321('0x56')]({'where':{'id':_0x1d1f03[_0xb321('0x59')]['id'],'UserId':null}})[_0xb321('0x22')](handleEntityNotFound(_0x541ca7,null))[_0xb321('0x22')](function(_0x12fcf5){if(_0x12fcf5){_0x52f6a6[_0xb321('0x29')]=_0x12fcf5[_0xb321('0x5f')]({'plain':!![]});return db[_0xb321('0x60')][_0xb321('0x56')]({'where':{'id':_0x12fcf5[_0xb321('0x61')]}});}return null;})[_0xb321('0x22')](handleEntityNotFound(_0x541ca7,null))[_0xb321('0x22')](function(_0x426fe7){if(_0x426fe7){_0x52f6a6[_0xb321('0x62')]=_0x426fe7[_0xb321('0x5f')]({'plain':!![]});interaction_log['info'](_0xb321('0x75'),_0x1d1f03[_0xb321('0x63')]['id'],_0x1d1f03[_0xb321('0x63')][_0xb321('0x3c')],_0x1d1f03['user'][_0xb321('0x64')],_0x52f6a6[_0xb321('0x62')]['id'],_0x1d1f03['body']?JSON[_0xb321('0x27')](_0x1d1f03[_0xb321('0x58')]):_0xb321('0x65'));return respondWithRpcPromise(_0xb321('0x76'),_0xb321('0x77'),_0x52f6a6);}return null;})[_0xb321('0x22')](function(_0x40f618){var _0x16c069=_0xb321('0x78')+_0x40f618[_0xb321('0x29')][_0xb321('0x79')];return db[_0xb321('0x67')][_0xb321('0x45')](_0x16c069,{'type':db['Sequelize'][_0xb321('0x7a')][_0xb321('0x7b')],'raw':!![]})['then'](function(_0x2c488a){return _0x2c488a;});})[_0xb321('0x22')](function(_0x5e15a9){if(_0x5e15a9){_0x52f6a6['message']['contact']=_0x5e15a9[0x0];if(!_0x1d1f03['body'][_0xb321('0x5e')])return;return db['User'][_0xb321('0x56')]({'where':{'id':_0x1d1f03[_0xb321('0x58')][_0xb321('0x5e')],'role':'agent'},'attributes':['id',_0xb321('0x3c'),_0xb321('0x6b'),_0xb321('0x6c'),_0xb321('0x6d')],'raw':!![]});}return null;})['then'](function(_0x59f6d9){if(!_0x59f6d9)return null;_0x52f6a6[_0xb321('0x29')][_0xb321('0x6e')]=_0x59f6d9;return _0x52f6a6;})[_0xb321('0x22')](function(_0x468664){if(_0x468664){_0x468664[_0xb321('0x29')]['interface']=util[_0xb321('0x7c')](_0xb321('0x70'),_0x1d1f03['user'][_0xb321('0x3c')]);_0x468664[_0xb321('0x29')][_0xb321('0x71')]=_0x52f6a6[_0xb321('0x71')];_0x468664['message'][_0xb321('0x7d')]=_0x52f6a6[_0xb321('0x71')];_0x468664[_0xb321('0x29')]['event']=_0xb321('0x36');respondWithRpcPromise(_0xb321('0x73'),_0xb321('0x73'),{'event':'rejectmessage','message':_0x468664[_0xb321('0x29')]},client9002);return _0x52f6a6;}return null;})['then'](respondWithResult(_0x541ca7,null))[_0xb321('0x2b')](handleError(_0x541ca7,null));};