26baa151602bc2950cca3e14c47af33c45a0f4c9
[motion2.git] / server / api / chatMessage / chatMessage.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 _0x38cf=['crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatMessage.socket','jayson/promise','client','http','request','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','sendStatus','end','status','offset','limit','undefined','count','set','Content-Range','json','save','update','then','stack','send','index','map','ChatMessage','key','name','query','intersection','model','fields','attributes','hasOwnProperty','order','where','pick','filters','filter','type','VIRTUAL','options','includeAll','include','findAll','rows','show','keys','rawAttributes','create','body','find','params','destroy','describe','chat-interactions','chat','read','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','ChatInteraction','ChatInteractionId','isNil','read1stAt','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','Sequelize','SELECT','agent','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','event','accept','acceptmessage','parse','interaction','../../config/logger','reject','get','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','RejectMessage','rejectMessage','QueryTypes','User','EventManager','merge','formData','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel'];(function(_0x1b1948,_0x49f451){var _0x3cbd38=function(_0x2ca4f2){while(--_0x2ca4f2){_0x1b1948['push'](_0x1b1948['shift']());}};_0x3cbd38(++_0x49f451);}(_0x38cf,0x104));var _0xf38c=function(_0x1abcea,_0x4b6ee8){_0x1abcea=_0x1abcea-0x0;var _0x4162ba=_0x38cf[_0x1abcea];return _0x4162ba;};'use strict';var emlformat=require(_0xf38c('0x0'));var rimraf=require(_0xf38c('0x1'));var zipdir=require(_0xf38c('0x2'));var jsonpatch=require(_0xf38c('0x3'));var rp=require(_0xf38c('0x4'));var moment=require(_0xf38c('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xf38c('0x6'));var util=require(_0xf38c('0x7'));var path=require(_0xf38c('0x8'));var sox=require(_0xf38c('0x9'));var csv=require(_0xf38c('0xa'));var ejs=require(_0xf38c('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf38c('0xc'));var squel=require(_0xf38c('0xd'));var crypto=require(_0xf38c('0xe'));var jsforce=require(_0xf38c('0xf'));var deskjs=require(_0xf38c('0x10'));var toCsv=require('to-csv');var querystring=require(_0xf38c('0x11'));var Papa=require(_0xf38c('0x12'));var Redis=require(_0xf38c('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xf38c('0x14'));var as=require(_0xf38c('0x15'));var hardwareService=require(_0xf38c('0x16'));var logger=require('../../config/logger')(_0xf38c('0x17'));var utils=require(_0xf38c('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0xf38c('0x19'));var db=require(_0xf38c('0x1a'))['db'];config[_0xf38c('0x1b')]=_[_0xf38c('0x1c')](config[_0xf38c('0x1b')],{'host':_0xf38c('0x1d'),'port':0x18eb});var socket=require(_0xf38c('0x1e'))(new Redis(config[_0xf38c('0x1b')]));require(_0xf38c('0x1f'))['register'](socket);var jayson=require(_0xf38c('0x20'));var client=jayson[_0xf38c('0x21')][_0xf38c('0x22')]({'port':0x232c});var client9002=jayson['client'][_0xf38c('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x49f5b5,_0x5b1ba4,_0x3e77a9,_0x435fee){return new BPromise(function(_0x1604eb,_0x36bc41){var _0x119bb9=_0x435fee||client;return _0x119bb9[_0xf38c('0x23')](_0x49f5b5,_0x3e77a9)['then'](function(_0x50d262){logger[_0xf38c('0x24')](_0xf38c('0x25'),_0x5b1ba4,_0xf38c('0x26'));logger[_0xf38c('0x27')](_0xf38c('0x28'),_0x5b1ba4,_0xf38c('0x26'),JSON[_0xf38c('0x29')](_0x50d262));if(_0x50d262[_0xf38c('0x2a')]){if(_0x50d262[_0xf38c('0x2a')][_0xf38c('0x2b')]===0x1f4){logger[_0xf38c('0x2a')](_0xf38c('0x25'),_0x5b1ba4,_0x50d262['error'][_0xf38c('0x2c')]);return _0x36bc41(_0x50d262[_0xf38c('0x2a')][_0xf38c('0x2c')]);}logger[_0xf38c('0x2a')]('ChatMessage,\x20%s,\x20%s',_0x5b1ba4,_0x50d262[_0xf38c('0x2a')][_0xf38c('0x2c')]);return _0x1604eb(_0x50d262['error'][_0xf38c('0x2c')]);}else{logger[_0xf38c('0x24')]('ChatMessage,\x20%s,\x20%s',_0x5b1ba4,_0xf38c('0x26'));_0x1604eb(_0x50d262['result'][_0xf38c('0x2c')]);}})[_0xf38c('0x2d')](function(_0x355945){logger[_0xf38c('0x2a')]('ChatMessage,\x20%s,\x20%s',_0x5b1ba4,_0x355945);_0x36bc41(_0x355945);});});}function respondWithStatusCode(_0x2403f1,_0x1b7935){_0x1b7935=_0x1b7935||0xcc;return function(_0xb679e6){if(_0xb679e6){return _0x2403f1[_0xf38c('0x2e')](_0x1b7935);}return _0x2403f1['status'](_0x1b7935)[_0xf38c('0x2f')]();};}function respondWithResult(_0x4722ca,_0x5ebd08){_0x5ebd08=_0x5ebd08||0xc8;return function(_0x27a112){if(_0x27a112){return _0x4722ca[_0xf38c('0x30')](_0x5ebd08)['json'](_0x27a112);}};}function respondWithFilteredResult(_0x564915,_0x2fca26){return function(_0x11378f){if(_0x11378f){var _0x3f072a=typeof _0x2fca26[_0xf38c('0x31')]==='undefined'&&typeof _0x2fca26[_0xf38c('0x32')]===_0xf38c('0x33');var _0x40deb0=_0x11378f['count'];var _0x3f5615=_0x3f072a?0x0:_0x2fca26[_0xf38c('0x31')];var _0x557235=_0x3f072a?_0x11378f[_0xf38c('0x34')]:_0x2fca26[_0xf38c('0x31')]+_0x2fca26[_0xf38c('0x32')];var _0x7fb5e4;if(_0x557235>=_0x40deb0){_0x557235=_0x40deb0;_0x7fb5e4=0xc8;}else{_0x7fb5e4=0xce;}_0x564915['status'](_0x7fb5e4);return _0x564915[_0xf38c('0x35')](_0xf38c('0x36'),_0x3f5615+'-'+_0x557235+'/'+_0x40deb0)[_0xf38c('0x37')](_0x11378f);}return null;};}function patchUpdates(_0x4a541f){return function(_0x3e070f){try{jsonpatch['apply'](_0x3e070f,_0x4a541f,!![]);}catch(_0x41b942){return BPromise['reject'](_0x41b942);}return _0x3e070f[_0xf38c('0x38')]();};}function saveUpdates(_0x35075e,_0x4d39de){return function(_0x538d02){if(_0x538d02){return _0x538d02[_0xf38c('0x39')](_0x35075e)[_0xf38c('0x3a')](function(_0x4f8f2d){return _0x4f8f2d;});}return null;};}function removeEntity(_0x1da6be,_0x4f1e50){return function(_0x14ad0b){if(_0x14ad0b){return _0x14ad0b['destroy']()[_0xf38c('0x3a')](function(){_0x1da6be['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3a3688,_0x19d3ef){return function(_0x5e9f3a){if(!_0x5e9f3a){_0x3a3688[_0xf38c('0x2e')](0x194);}return _0x5e9f3a;};}function handleError(_0x4d30b6,_0x406cf3){_0x406cf3=_0x406cf3||0x1f4;return function(_0x236abb){logger[_0xf38c('0x2a')](_0x236abb[_0xf38c('0x3b')]);if(_0x236abb['name']){delete _0x236abb['name'];}_0x4d30b6[_0xf38c('0x30')](_0x406cf3)[_0xf38c('0x3c')](_0x236abb);};}exports[_0xf38c('0x3d')]=function(_0x3b3012,_0x391e0e){var _0x47d75b={},_0x42cdbf={},_0x931d45={'count':0x0,'rows':[]};var _0x17b59a=_[_0xf38c('0x3e')](db[_0xf38c('0x3f')]['rawAttributes'],function(_0x53e4f6){return{'name':_0x53e4f6['fieldName'],'type':_0x53e4f6['type'][_0xf38c('0x40')]};});_0x42cdbf['model']=_['map'](_0x17b59a,_0xf38c('0x41'));_0x42cdbf[_0xf38c('0x42')]=_['keys'](_0x3b3012[_0xf38c('0x42')]);_0x42cdbf['filters']=_[_0xf38c('0x43')](_0x42cdbf[_0xf38c('0x44')],_0x42cdbf['query']);_0x47d75b['attributes']=_['intersection'](_0x42cdbf[_0xf38c('0x44')],qs[_0xf38c('0x45')](_0x3b3012[_0xf38c('0x42')][_0xf38c('0x45')]));_0x47d75b[_0xf38c('0x46')]=_0x47d75b['attributes']['length']?_0x47d75b[_0xf38c('0x46')]:_0x42cdbf[_0xf38c('0x44')];if(!_0x3b3012[_0xf38c('0x42')][_0xf38c('0x47')]('nolimit')){_0x47d75b[_0xf38c('0x32')]=qs['limit'](_0x3b3012['query']['limit']);_0x47d75b[_0xf38c('0x31')]=qs[_0xf38c('0x31')](_0x3b3012[_0xf38c('0x42')][_0xf38c('0x31')]);}_0x47d75b[_0xf38c('0x48')]=qs['sort'](_0x3b3012[_0xf38c('0x42')]['sort']);_0x47d75b[_0xf38c('0x49')]=qs['filters'](_[_0xf38c('0x4a')](_0x3b3012[_0xf38c('0x42')],_0x42cdbf[_0xf38c('0x4b')]),_0x17b59a);if(_0x3b3012[_0xf38c('0x42')][_0xf38c('0x4c')]){_0x47d75b[_0xf38c('0x49')]=_['merge'](_0x47d75b[_0xf38c('0x49')],{'$or':_[_0xf38c('0x3e')](_0x17b59a,function(_0x5a40c9){if(_0x5a40c9[_0xf38c('0x4d')]!==_0xf38c('0x4e')){var _0x545489={};_0x545489[_0x5a40c9[_0xf38c('0x41')]]={'$like':'%'+_0x3b3012[_0xf38c('0x42')][_0xf38c('0x4c')]+'%'};return _0x545489;}})});}_0x47d75b=_['merge']({},_0x47d75b,_0x3b3012[_0xf38c('0x4f')]);var _0x2c7667={'where':_0x47d75b[_0xf38c('0x49')]};return db[_0xf38c('0x3f')]['count'](_0x2c7667)[_0xf38c('0x3a')](function(_0x494aab){_0x931d45['count']=_0x494aab;if(_0x3b3012[_0xf38c('0x42')][_0xf38c('0x50')]){_0x47d75b[_0xf38c('0x51')]=[{'all':!![]}];}return db['ChatMessage'][_0xf38c('0x52')](_0x47d75b);})[_0xf38c('0x3a')](function(_0x379bc2){_0x931d45[_0xf38c('0x53')]=_0x379bc2;return _0x931d45;})['then'](respondWithFilteredResult(_0x391e0e,_0x47d75b))['catch'](handleError(_0x391e0e,null));};exports[_0xf38c('0x54')]=function(_0x258d6f,_0x8e784){var _0x4a7470={'raw':!![],'where':{'id':_0x258d6f['params']['id']}},_0x6b2f02={};_0x6b2f02['model']=_[_0xf38c('0x55')](db['ChatMessage'][_0xf38c('0x56')]);_0x6b2f02[_0xf38c('0x42')]=_['keys'](_0x258d6f[_0xf38c('0x42')]);_0x6b2f02[_0xf38c('0x4b')]=_[_0xf38c('0x43')](_0x6b2f02[_0xf38c('0x44')],_0x6b2f02[_0xf38c('0x42')]);_0x4a7470[_0xf38c('0x46')]=_['intersection'](_0x6b2f02['model'],qs['fields'](_0x258d6f[_0xf38c('0x42')][_0xf38c('0x45')]));_0x4a7470[_0xf38c('0x46')]=_0x4a7470[_0xf38c('0x46')]['length']?_0x4a7470[_0xf38c('0x46')]:_0x6b2f02[_0xf38c('0x44')];if(_0x258d6f[_0xf38c('0x42')][_0xf38c('0x50')]){_0x4a7470[_0xf38c('0x51')]=[{'all':!![]}];}_0x4a7470=_['merge']({},_0x4a7470,_0x258d6f[_0xf38c('0x4f')]);return db[_0xf38c('0x3f')]['find'](_0x4a7470)[_0xf38c('0x3a')](handleEntityNotFound(_0x8e784,null))[_0xf38c('0x3a')](respondWithResult(_0x8e784,null))['catch'](handleError(_0x8e784,null));};exports[_0xf38c('0x57')]=function(_0xbd4cd2,_0x13f39c){return db[_0xf38c('0x3f')][_0xf38c('0x57')](_0xbd4cd2['body'],{})[_0xf38c('0x3a')](respondWithResult(_0x13f39c,0xc9))['catch'](handleError(_0x13f39c,null));};exports['update']=function(_0x23c9b3,_0x5cfe3b){if(_0x23c9b3[_0xf38c('0x58')]['id']){delete _0x23c9b3[_0xf38c('0x58')]['id'];}return db['ChatMessage'][_0xf38c('0x59')]({'where':{'id':_0x23c9b3[_0xf38c('0x5a')]['id']}})['then'](handleEntityNotFound(_0x5cfe3b,null))[_0xf38c('0x3a')](saveUpdates(_0x23c9b3[_0xf38c('0x58')],null))[_0xf38c('0x3a')](respondWithResult(_0x5cfe3b,null))['catch'](handleError(_0x5cfe3b,null));};exports[_0xf38c('0x5b')]=function(_0x1e0c55,_0x33404e){return db[_0xf38c('0x3f')][_0xf38c('0x59')]({'where':{'id':_0x1e0c55[_0xf38c('0x5a')]['id']}})[_0xf38c('0x3a')](handleEntityNotFound(_0x33404e,null))[_0xf38c('0x3a')](removeEntity(_0x33404e,null))[_0xf38c('0x2d')](handleError(_0x33404e,null));};exports[_0xf38c('0x5c')]=function(_0x5289ae,_0x4e48b4){return db[_0xf38c('0x3f')][_0xf38c('0x5c')]()[_0xf38c('0x3a')](respondWithResult(_0x4e48b4,null))[_0xf38c('0x2d')](handleError(_0x4e48b4,null));};var interaction_log=require('../../config/logger')(_0xf38c('0x5d'));exports['accept']=function(_0x112074,_0x581bc7,_0x56c340){var _0x33244e={'agent':{},'channel':_0xf38c('0x5e')};if(_0x112074['body']['id']){delete _0x112074[_0xf38c('0x58')]['id'];}_0x112074['body'][_0xf38c('0x5f')]=!![];_0x112074['body']['readAt']=moment()[_0xf38c('0x60')](_0xf38c('0x61'));_0x112074['body'][_0xf38c('0x62')]=_0x112074[_0xf38c('0x58')][_0xf38c('0x62')]||_0x112074[_0xf38c('0x63')]['id'];_0x33244e['agent']['id']=_0x112074[_0xf38c('0x58')][_0xf38c('0x62')];return db[_0xf38c('0x3f')][_0xf38c('0x59')]({'where':{'id':_0x112074[_0xf38c('0x5a')]['id'],'UserId':null}})[_0xf38c('0x3a')](handleEntityNotFound(_0x581bc7,null))[_0xf38c('0x3a')](saveUpdates(_0x112074[_0xf38c('0x58')],null))['then'](function(_0x3d62bd){if(_0x3d62bd){_0x33244e[_0xf38c('0x2c')]=_0x3d62bd['get']({'plain':!![]});return db[_0xf38c('0x64')][_0xf38c('0x59')]({'where':{'id':_0x3d62bd[_0xf38c('0x65')]}});}return null;})[_0xf38c('0x3a')](handleEntityNotFound(_0x581bc7,null))[_0xf38c('0x3a')](function(_0x5255cd){if(_0x5255cd){return _0x5255cd[_0xf38c('0x39')]({'UserId':_0x112074[_0xf38c('0x58')][_0xf38c('0x62')],'read1stAt':_[_0xf38c('0x66')](_0x5255cd[_0xf38c('0x67')])?moment()[_0xf38c('0x60')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xf38c('0x3a')](function(_0x4ba4b1){if(_0x4ba4b1){_0x33244e['interaction']=_0x4ba4b1['get']({'plain':!![]});interaction_log[_0xf38c('0x24')](_0xf38c('0x68'),_0x112074['user']['id'],_0x112074[_0xf38c('0x63')][_0xf38c('0x41')],_0x112074[_0xf38c('0x63')]['role'],_0x33244e['interaction']['id'],_0x112074[_0xf38c('0x58')]?JSON['stringify'](_0x112074[_0xf38c('0x58')]):'null');return respondWithRpcPromise(_0xf38c('0x69'),'acceptMessage',_0x33244e);}return null;})[_0xf38c('0x3a')](function(_0x12773c){var _0x34731c=_0xf38c('0x6a')+_0x12773c[_0xf38c('0x2c')][_0xf38c('0x6b')];return db['sequelize'][_0xf38c('0x42')](_0x34731c,{'type':db[_0xf38c('0x6c')]['QueryTypes'][_0xf38c('0x6d')],'raw':!![]})['then'](function(_0x363601){return _0x363601;});})['then'](function(_0x168300){if(_0x168300){_0x33244e[_0xf38c('0x2c')]['contact']=_0x168300[0x0];if(!_0x112074['body'][_0xf38c('0x62')])return;return db['User'][_0xf38c('0x59')]({'where':{'id':_0x112074[_0xf38c('0x58')]['UserId'],'role':_0xf38c('0x6e')},'attributes':['id',_0xf38c('0x41'),_0xf38c('0x6f'),_0xf38c('0x70'),_0xf38c('0x71')],'raw':!![]});}return null;})[_0xf38c('0x3a')](function(_0x33e4f4){if(!_0x33e4f4)return null;_0x33244e[_0xf38c('0x2c')][_0xf38c('0x6e')]=_0x33e4f4;return _0x33244e;})['then'](function(_0x396d37){if(_0x396d37){if(_0x112074[_0xf38c('0x58')][_0xf38c('0x72')]){_0x33244e['message'][_0xf38c('0x73')]=util[_0xf38c('0x60')](_0xf38c('0x74'),_0x112074['user'][_0xf38c('0x41')]);_0x33244e[_0xf38c('0x2c')][_0xf38c('0x75')]=_0x33244e[_0xf38c('0x75')];_0x33244e[_0xf38c('0x2c')][_0xf38c('0x76')]=_0x33244e['channel'];_0x33244e[_0xf38c('0x2c')][_0xf38c('0x77')]=_0xf38c('0x78');return respondWithRpcPromise('EventManager','EventManager',{'event':_0xf38c('0x79'),'message':_['merge'](_0x33244e[_0xf38c('0x2c')],JSON[_0xf38c('0x7a')](_0x33244e[_0xf38c('0x7b')]['formData']))},client9002)[_0xf38c('0x3a')](function(){return _0x33244e;});}return _0x33244e;}return null;})[_0xf38c('0x3a')](respondWithResult(_0x581bc7,null))[_0xf38c('0x2d')](handleError(_0x581bc7,null));};var interaction_log=require(_0xf38c('0x7c'))(_0xf38c('0x5d'));exports[_0xf38c('0x7d')]=function(_0x50151c,_0x453a0e,_0x78bb1e){var _0x255f91={'agent':{},'channel':_0xf38c('0x5e')};if(_0x50151c[_0xf38c('0x58')]['id']){delete _0x50151c[_0xf38c('0x58')]['id'];}_0x50151c[_0xf38c('0x58')][_0xf38c('0x62')]=_0x50151c['body'][_0xf38c('0x62')]||_0x50151c[_0xf38c('0x63')]['id'];_0x255f91[_0xf38c('0x6e')]['id']=_0x50151c[_0xf38c('0x58')][_0xf38c('0x62')];return db[_0xf38c('0x3f')][_0xf38c('0x59')]({'where':{'id':_0x50151c[_0xf38c('0x5a')]['id'],'UserId':null}})[_0xf38c('0x3a')](handleEntityNotFound(_0x453a0e,null))['then'](function(_0x4c2c9d){if(_0x4c2c9d){_0x255f91[_0xf38c('0x2c')]=_0x4c2c9d[_0xf38c('0x7e')]({'plain':!![]});return db['ChatInteraction']['find']({'where':{'id':_0x4c2c9d['ChatInteractionId']}});}return null;})[_0xf38c('0x3a')](handleEntityNotFound(_0x453a0e,null))[_0xf38c('0x3a')](function(_0x5bf4a1){if(_0x5bf4a1){_0x255f91['interaction']=_0x5bf4a1[_0xf38c('0x7e')]({'plain':!![]});interaction_log[_0xf38c('0x24')](_0xf38c('0x7f'),_0x50151c[_0xf38c('0x63')]['id'],_0x50151c['user'][_0xf38c('0x41')],_0x50151c[_0xf38c('0x63')][_0xf38c('0x80')],_0x255f91[_0xf38c('0x7b')]['id'],_0x50151c[_0xf38c('0x58')]?JSON[_0xf38c('0x29')](_0x50151c[_0xf38c('0x58')]):_0xf38c('0x81'));return respondWithRpcPromise(_0xf38c('0x82'),_0xf38c('0x83'),_0x255f91);}return null;})[_0xf38c('0x3a')](function(_0x286ddd){var _0x5185a9=_0xf38c('0x6a')+_0x286ddd[_0xf38c('0x2c')][_0xf38c('0x6b')];return db['sequelize'][_0xf38c('0x42')](_0x5185a9,{'type':db[_0xf38c('0x6c')][_0xf38c('0x84')][_0xf38c('0x6d')],'raw':!![]})[_0xf38c('0x3a')](function(_0x359454){return _0x359454;});})[_0xf38c('0x3a')](function(_0x45ce06){if(_0x45ce06){_0x255f91[_0xf38c('0x2c')]['contact']=_0x45ce06[0x0];if(!_0x50151c[_0xf38c('0x58')][_0xf38c('0x62')])return;return db[_0xf38c('0x85')][_0xf38c('0x59')]({'where':{'id':_0x50151c['body']['UserId'],'role':_0xf38c('0x6e')},'attributes':['id',_0xf38c('0x41'),'fullname','email',_0xf38c('0x71')],'raw':!![]});}return null;})[_0xf38c('0x3a')](function(_0x923fab){if(!_0x923fab)return null;_0x255f91[_0xf38c('0x2c')][_0xf38c('0x6e')]=_0x923fab;return _0x255f91;})[_0xf38c('0x3a')](function(_0x40315c){if(_0x40315c){_0x40315c[_0xf38c('0x2c')]['interface']=util['format'](_0xf38c('0x74'),_0x50151c[_0xf38c('0x63')][_0xf38c('0x41')]);_0x40315c[_0xf38c('0x2c')][_0xf38c('0x75')]=_0x255f91['channel'];_0x40315c['message'][_0xf38c('0x76')]=_0x255f91[_0xf38c('0x75')];_0x40315c[_0xf38c('0x2c')][_0xf38c('0x77')]='reject';respondWithRpcPromise('EventManager',_0xf38c('0x86'),{'event':'rejectmessage','message':_[_0xf38c('0x87')](_0x255f91[_0xf38c('0x2c')],JSON[_0xf38c('0x7a')](_0x255f91[_0xf38c('0x7b')][_0xf38c('0x88')]))},client9002);return _0x255f91;}return null;})[_0xf38c('0x3a')](respondWithResult(_0x453a0e,null))[_0xf38c('0x2d')](handleError(_0x453a0e,null));};