mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-02 08:40:26 +00:00
refactor: get friends, get groups, get group members, get group member
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { OB11User } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { friends } from '../../../common/data';
|
||||
import { friends } from '@/core/data';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQUserApi } from '@/core/apis';
|
||||
@@ -15,7 +15,7 @@ export class GetCookies extends BaseAction<Payload, Response> {
|
||||
actionName = ActionName.GetCookies;
|
||||
|
||||
protected async _handle(payload: Payload) {
|
||||
let _Skey = await NTQQUserApi.getSkey();
|
||||
const _Skey = await NTQQUserApi.getSkey();
|
||||
// 取Skey
|
||||
// 先NodeIKernelTicketService.forceFetchClientKey('')
|
||||
// 返回值
|
||||
@@ -29,7 +29,7 @@ export class GetCookies extends BaseAction<Payload, Response> {
|
||||
// }
|
||||
// request https://ssl.ptlogin2.qq.com/jump?ptlang=1033&clientuin=1627126029&clientkey=key
|
||||
// &u1=https%3A%2F%2Fh5.qzone.qq.com%2Fqqnt%2Fqzoneinpcqq%2Ffriend%3Frefresh%3D0%26clientuin%3D0%26darkMode%3D0&keyindex=keyIndex
|
||||
let _PSkey = await NTQQUserApi.getPSkey([payload.domain]);
|
||||
const _PSkey = await NTQQUserApi.getPSkey([payload.domain]);
|
||||
// 取Pskey
|
||||
// NodeIKernelTipOffService.getPskey([ 'qun.qq.com' ], true )
|
||||
// {
|
||||
@@ -40,7 +40,7 @@ export class GetCookies extends BaseAction<Payload, Response> {
|
||||
// }
|
||||
// }
|
||||
if (!_PSkey || !_Skey) {
|
||||
throw new Error("获取Cookies失败");
|
||||
throw new Error('获取Cookies失败');
|
||||
}
|
||||
return { Pskey: _PSkey, Skey: _Skey };
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { OB11User } from '../../types';
|
||||
import { OB11Constructor } from '../../constructor';
|
||||
import { friends } from '../../../common/data';
|
||||
import { friends } from '@/core/data';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { NTQQUserApi } from '@/core/apis';
|
||||
import BaseAction from '../BaseAction';
|
||||
import { getFriend, getUidByUin, uid2UinMap } from '@/common/data';
|
||||
import { getFriend, getUidByUin, uid2UinMap } from '@/core/data';
|
||||
import { ActionName } from '../types';
|
||||
import { log, logDebug } from '@/common/utils/log';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import BaseAction from '../BaseAction';
|
||||
import { ActionName } from '../types';
|
||||
import { NTQQFriendApi } from '@/core/apis/friend';
|
||||
import { friendRequests } from '@/common/data';
|
||||
import { friendRequests } from '@/core/data';
|
||||
|
||||
interface Payload {
|
||||
flag: string,
|
||||
|
||||
Reference in New Issue
Block a user