mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2024-11-21 09:36:35 +00:00
style&&chore: 逐步清退老版本代码
This commit is contained in:
parent
8e14b39969
commit
29b51adf7d
@ -6,14 +6,9 @@ export class GetFriendWithCategory extends BaseAction<void, any> {
|
|||||||
actionName = ActionName.GetFriendsWithCategory;
|
actionName = ActionName.GetFriendsWithCategory;
|
||||||
|
|
||||||
async _handle(payload: void) {
|
async _handle(payload: void) {
|
||||||
if (this.CoreContext.context.basicInfoWrapper.requireMinNTQQBuild('26702')) {
|
return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({
|
||||||
//全新逻辑
|
...category,
|
||||||
return (await this.CoreContext.apis.FriendApi.getBuddyV2ExWithCate(true)).map(category => ({
|
buddyList: OB11Constructor.friendsV2(category.buddyList),
|
||||||
...category,
|
}));
|
||||||
buddyList: OB11Constructor.friendsV2(category.buddyList),
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
throw new Error('this ntqq version not support, must be 26702 or later');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ export class GetRobotUinRange extends BaseAction<void, Array<any>> {
|
|||||||
actionName = ActionName.GetRobotUinRange;
|
actionName = ActionName.GetRobotUinRange;
|
||||||
|
|
||||||
async _handle(payload: void) {
|
async _handle(payload: void) {
|
||||||
// console.log(await NTQQUserApi.getRobotUinRange());
|
|
||||||
const NTQQUserApi = this.CoreContext.apis.UserApi;
|
const NTQQUserApi = this.CoreContext.apis.UserApi;
|
||||||
return await NTQQUserApi.getRobotUinRange();
|
return await NTQQUserApi.getRobotUinRange();
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,7 @@ export default class DelEssenceMsg extends BaseAction<Payload, any> {
|
|||||||
async _handle(payload: Payload): Promise<any> {
|
async _handle(payload: Payload): Promise<any> {
|
||||||
const NTQQGroupApi = this.CoreContext.apis.GroupApi;
|
const NTQQGroupApi = this.CoreContext.apis.GroupApi;
|
||||||
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
const msg = MessageUnique.getMsgIdAndPeerByShortId(parseInt(payload.message_id.toString()));
|
||||||
if (!msg) {
|
if (!msg) throw new Error('msg not found');
|
||||||
throw new Error('msg not found');
|
|
||||||
}
|
|
||||||
return await NTQQGroupApi.removeGroupEssence(
|
return await NTQQGroupApi.removeGroupEssence(
|
||||||
msg.Peer.peerUid,
|
msg.Peer.peerUid,
|
||||||
msg.MsgId,
|
msg.MsgId,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user