1 line
8.6 KiB
JavaScript
1 line
8.6 KiB
JavaScript
const _0x1854c0=_0x365e;(function(_0x2a25bb,_0x10febd){const _0xfac2eb=_0x365e,_0x359473=_0x2a25bb();while(!![]){try{const _0x207d4e=-parseInt(_0xfac2eb(0xa9))/0x1*(-parseInt(_0xfac2eb(0x86))/0x2)+-parseInt(_0xfac2eb(0x73))/0x3+parseInt(_0xfac2eb(0x8b))/0x4*(-parseInt(_0xfac2eb(0x7f))/0x5)+-parseInt(_0xfac2eb(0x82))/0x6*(parseInt(_0xfac2eb(0x74))/0x7)+-parseInt(_0xfac2eb(0x8e))/0x8+parseInt(_0xfac2eb(0x85))/0x9+parseInt(_0xfac2eb(0x7e))/0xa;if(_0x207d4e===_0x10febd)break;else _0x359473['push'](_0x359473['shift']());}catch(_0x29cf06){_0x359473['push'](_0x359473['shift']());}}}(_0x3146,0xe4e1f));import{selfInfo}from'@/core/data';function _0x3146(){const _0x1ca937=['jNlGq','发送超时','GixQZ','activateChatAndGetHistory','uid','set','oOAkk','onLoginSuccess','arkElement','NJNBK','parse','onAddSendMsg','1691387lzwdEO','session','catch','4916034JherDZ','7zaBVlT','find','multiForwardMsgWithComment','setMsgRead','OoQsx','length','PAFgG','onMsgInfoListUpdate','getMsgsBySeqAndCount','then','31757240RCNBce','263465DsyRLQ','nick','setMsgEmojiLikes','8084682JNQUpf','getMsgService','app','14804406auTDbk','2weZAvm','delete','forEach','recallMsg','DSmzP','76OcFBgk','getMsgsByMsgId','msgId','12698000bTinmx','Poagz','CsjDN','pNkMc','fetchRecentContact','forwardMsg','senderUid','com.tencent.multimsg','转发消息超时','SrFzH','getMsgHistory','sendStatus','addListener','TpqZB','peerUid'];_0x3146=function(){return _0x1ca937;};return _0x3146();}function _0x365e(_0x2049ce,_0x1d1271){const _0x314647=_0x3146();return _0x365e=function(_0x365e7b,_0x56e9e3){_0x365e7b=_0x365e7b-0x71;let _0x13039f=_0x314647[_0x365e7b];return _0x13039f;},_0x365e(_0x2049ce,_0x1d1271);}import{log,logError}from'@/common/utils/log';import{sleep}from'@/common/utils/helper';import{napCatCore}from'@/core';import{MsgListener}from'@/core/listeners';import{randomUUID}from'crypto';const sendMessagePool={},sendSuccessCBMap={},sentMsgTasks=new Map(),msgListener=new MsgListener();msgListener[_0x1854c0(0xa8)]=_0x59badf=>{const _0x4427c8=_0x1854c0,_0x102667={'OoQsx':function(_0x536fac,_0x2db958){return _0x536fac(_0x2db958);},'qjwSd':function(_0x442663,_0xa74dce){return _0x442663 instanceof _0xa74dce;}};for(const [_0x3673f5,_0x2c38ef]of sentMsgTasks){_0x102667[_0x4427c8(0x78)](_0x2c38ef,_0x59badf),sentMsgTasks[_0x4427c8(0x87)](_0x3673f5);}if(sendMessagePool[_0x59badf[_0x4427c8(0x9c)]]){const _0x103f69=sendMessagePool[_0x59badf[_0x4427c8(0x9c)]]?.(_0x59badf);_0x102667['qjwSd'](_0x103f69,Promise)&&_0x103f69[_0x4427c8(0x7d)]()[_0x4427c8(0x72)](logError);}},msgListener[_0x1854c0(0x7b)]=_0x59ce37=>{const _0x11567c=_0x1854c0,_0x8b1d99={'PAFgG':function(_0xa60863,_0x3ead88){return _0xa60863 instanceof _0x3ead88;},'lGlTj':function(_0x5c177d,_0x41a176){return _0x5c177d(_0x41a176);}};_0x59ce37[_0x11567c(0x88)](_0x149872=>{const _0x54eb08=_0x11567c,_0x28b358={'oOAkk':function(_0x25b0ca,_0x2d7975){const _0x4cbfd8=_0x365e;return _0x8b1d99[_0x4cbfd8(0x7a)](_0x25b0ca,_0x2d7975);},'pNkMc':function(_0x2e348a,_0x10a5b9){return _0x8b1d99['lGlTj'](_0x2e348a,_0x10a5b9);}};new Promise((_0x1e7c7c,_0x26d2c7)=>{const _0x6ba811=_0x365e;for(const _0x2f2c12 in sendSuccessCBMap){const _0x339f19=sendSuccessCBMap[_0x2f2c12],_0x3f2a5c=_0x339f19(_0x149872),_0x1893f9=_0x13950c=>{_0x13950c&&delete sendSuccessCBMap[_0x2f2c12];};_0x28b358[_0x6ba811(0xa3)](_0x3f2a5c,Promise)?_0x3f2a5c['then'](_0x1893f9):_0x28b358[_0x6ba811(0x91)](_0x1893f9,_0x3f2a5c);}})[_0x54eb08(0x7d)]()[_0x54eb08(0x72)](log);});},setTimeout(()=>{const _0x15649a=_0x1854c0;napCatCore[_0x15649a(0xa4)](()=>{const _0x5b9e52=_0x15649a;napCatCore[_0x5b9e52(0x9a)](msgListener);});},0x64);export class NTQQMsgApi{static async['setEmojiLike'](_0x1bde06,_0x5d9538,_0x575756,_0x21325c=!![]){const _0x1472d5=_0x1854c0;return _0x575756=_0x575756['toString'](),napCatCore[_0x1472d5(0x71)][_0x1472d5(0x83)]()[_0x1472d5(0x81)](_0x1bde06,_0x5d9538,_0x575756,_0x575756[_0x1472d5(0x79)]>0x3?'2':'1',_0x21325c);}static async['getMultiMsg'](_0xcdea88,_0x4a4400,_0x4f9693){const _0x1e6cf=_0x1854c0;return napCatCore[_0x1e6cf(0x71)][_0x1e6cf(0x83)]()['getMultiMsg'](_0xcdea88,_0x4a4400,_0x4f9693);}static async[_0x1854c0(0x8c)](_0x4b174f,_0x297795){const _0x9e35b=_0x1854c0;return await napCatCore['session'][_0x9e35b(0x83)]()[_0x9e35b(0x8c)](_0x4b174f,_0x297795);}static async[_0x1854c0(0x7c)](_0x557838,_0x4fa893,_0x449db4,_0x29581d,_0xe142fc){const _0x42b13d=_0x1854c0;return await napCatCore[_0x42b13d(0x71)][_0x42b13d(0x83)]()[_0x42b13d(0x7c)](_0x557838,_0x4fa893,_0x449db4,_0x29581d,_0xe142fc);}static async['activateChat'](_0xe79ae4){}static async[_0x1854c0(0xa0)](_0x2fda93){}static async[_0x1854c0(0x77)](_0x388418){const _0x4a0aaf=_0x1854c0;return napCatCore['session'][_0x4a0aaf(0x83)]()[_0x4a0aaf(0x77)](_0x388418);}static async[_0x1854c0(0x98)](_0x5975b4,_0x43ae25,_0x1b8973){const _0x21c545=_0x1854c0;return napCatCore[_0x21c545(0x71)][_0x21c545(0x83)]()['getMsgsIncludeSelf'](_0x5975b4,_0x43ae25,_0x1b8973,!![]);}static async[_0x1854c0(0x92)](){}static async[_0x1854c0(0x89)](_0x5e0186,_0x45c3ef){const _0x2e45ac=_0x1854c0;await napCatCore[_0x2e45ac(0x71)][_0x2e45ac(0x83)]()[_0x2e45ac(0x89)]({'chatType':_0x5e0186['chatType'],'peerUid':_0x5e0186[_0x2e45ac(0x9c)]},_0x45c3ef);}static async['sendMsg'](_0x212f38,_0x1062bf,_0x63069b=!![],_0xe7094=0x2710){const _0x474b2f=_0x1854c0,_0x4419c8={'zIWZW':function(_0x27bb59,_0x1efc51){return _0x27bb59(_0x1efc51);},'SrFzH':function(_0x120044){return _0x120044();},'RYwbY':function(_0x80ddf7,_0x2d4ffd){return _0x80ddf7(_0x2d4ffd);},'NJNBK':function(_0x3bf5cc,_0x1a5202){return _0x3bf5cc===_0x1a5202;},'GixQZ':function(_0x38be74){return _0x38be74();}},_0xe136e6=_0x212f38[_0x474b2f(0x9c)];let _0x411bbf=0x0;const _0x2035ef=async()=>{const _0x41fe1d=_0x474b2f;if(_0x411bbf>_0xe7094)throw _0x41fe1d(0x9e);const _0x4520e7=sendMessagePool[_0x212f38[_0x41fe1d(0x9c)]];if(_0x4520e7)return await _0x4419c8['zIWZW'](sleep,0x1f4),_0x411bbf+=0x1f4,await _0x4419c8['SrFzH'](_0x2035ef);else return;};return await _0x4419c8[_0x474b2f(0x9f)](_0x2035ef),new Promise((_0x44f677,_0xcca8ef)=>{const _0x523a4b=_0x474b2f,_0x170cbe={'jNlGq':function(_0x8b63fd,_0x454054){const _0x113e5f=_0x365e;return _0x4419c8[_0x113e5f(0xa6)](_0x8b63fd,_0x454054);}};let _0x6f587d=![],_0x3620cf=null;const _0x39ff7b=_0x4419c8[_0x523a4b(0x97)](randomUUID);sendSuccessCBMap[_0x39ff7b]=_0x39b9a1=>{const _0x4cd83f=_0x523a4b;if(_0x39b9a1[_0x4cd83f(0x8d)]===_0x3620cf?.[_0x4cd83f(0x8d)]){if(_0x170cbe[_0x4cd83f(0x9d)](_0x39b9a1[_0x4cd83f(0x99)],0x2))return delete sendSuccessCBMap[_0x39ff7b],_0x6f587d=!![],_0x44f677(_0x39b9a1),!![];return![];}return![];},sendMessagePool[_0xe136e6]=async _0x56a7d4=>{delete sendMessagePool[_0xe136e6],_0x3620cf=_0x56a7d4;},setTimeout(()=>{if(_0x6f587d)return;delete sendMessagePool[_0xe136e6],delete sendSuccessCBMap[_0x39ff7b],_0x4419c8['RYwbY'](_0xcca8ef,'发送超时');},_0xe7094);const _0x15fb49=napCatCore[_0x523a4b(0x71)][_0x523a4b(0x83)]()['sendMsg']('0',_0x212f38,_0x1062bf,new Map());});}static async[_0x1854c0(0x93)](_0x3dd852,_0xe3ff55,_0xfa1c20){const _0x1c7a6b=_0x1854c0;return napCatCore[_0x1c7a6b(0x71)]['getMsgService']()['forwardMsg'](_0xfa1c20,_0x3dd852,[_0xe3ff55],new Map());}static async['multiForwardMsg'](_0x3b1463,_0x146ec3,_0x594383){const _0x18f518=_0x1854c0,_0x1738e3={'VAoAf':function(_0x39515c,_0x22e236){return _0x39515c!=_0x22e236;},'TpqZB':function(_0x23720f,_0x194cbb){return _0x23720f==_0x194cbb;},'pjslb':_0x18f518(0x96),'DSmzP':function(_0x4884ba,_0x1bb76c,_0x234936){return _0x4884ba(_0x1bb76c,_0x234936);}},_0x133f20=_0x594383['map'](_0xea9d5d=>{const _0x96e1c7=_0x18f518;return{'msgId':_0xea9d5d,'senderShowName':selfInfo[_0x96e1c7(0x80)]};});return new Promise((_0xddd41c,_0x1ed1b7)=>{const _0x11b451=_0x18f518,_0x8ed08={'CsjDN':function(_0x1c5813,_0x8f2ced){return _0x1738e3['VAoAf'](_0x1c5813,_0x8f2ced);},'Poagz':function(_0x2ef657,_0x3cff25){const _0x398753=_0x365e;return _0x1738e3[_0x398753(0x9b)](_0x2ef657,_0x3cff25);},'QtbGz':function(_0x47b960,_0x16ba47){return _0x47b960(_0x16ba47);},'qTqZG':_0x1738e3['pjslb']};let _0x2bff84=![];const _0x3a0ca0=_0xb5d72=>{const _0x1e8f85=_0x365e,_0x4fc28a=_0xb5d72['elements'][_0x1e8f85(0x75)](_0x406c66=>_0x406c66[_0x1e8f85(0xa5)]);if(!_0x4fc28a)return;const _0xbf7ef6=JSON[_0x1e8f85(0xa7)](_0x4fc28a[_0x1e8f85(0xa5)]['bytesData']);if(_0x8ed08[_0x1e8f85(0x90)](_0xbf7ef6[_0x1e8f85(0x84)],_0x1e8f85(0x95)))return;_0xb5d72[_0x1e8f85(0x9c)]==_0x146ec3[_0x1e8f85(0x9c)]&&_0x8ed08[_0x1e8f85(0x8f)](_0xb5d72[_0x1e8f85(0x94)],selfInfo[_0x1e8f85(0xa1)])&&(_0x2bff84=!![],_0x8ed08['QtbGz'](_0xddd41c,_0xb5d72));};sentMsgTasks[_0x11b451(0xa2)](randomUUID(),_0x3a0ca0),_0x1738e3[_0x11b451(0x8a)](setTimeout,()=>{!_0x2bff84&&_0x1ed1b7(_0x8ed08['qTqZG']);},0x1388),napCatCore[_0x11b451(0x71)]['getMsgService']()[_0x11b451(0x76)](_0x133f20,_0x3b1463,_0x146ec3,[],new Map());});}} |