mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2025-07-19 12:03:37 +00:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
304a0dda3e | ||
![]() |
fff9c4a4d8 | ||
![]() |
2c76102fc4 | ||
![]() |
f576cd9417 | ||
![]() |
9cfd224b74 | ||
![]() |
c12f8de8b4 | ||
![]() |
ed9a7c52e2 | ||
![]() |
38fcaaa28b |
12
.github/workflows/release.yml
vendored
12
.github/workflows/release.yml
vendored
@@ -150,3 +150,15 @@ jobs:
|
|||||||
NapCat.Shell.zip
|
NapCat.Shell.zip
|
||||||
NapCat.Framework.Windows.Once.zip
|
NapCat.Framework.Windows.Once.zip
|
||||||
draft: true
|
draft: true
|
||||||
|
|
||||||
|
build-docker:
|
||||||
|
needs: release-napcat
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Dispatch Docker Build
|
||||||
|
run: |
|
||||||
|
curl -X POST \
|
||||||
|
-H "Authorization: Bearer ${{ secrets.NAPCAT_BUILD }}" \
|
||||||
|
-H "Accept: application/vnd.github.v3+json" \
|
||||||
|
https://api.github.com/repos/NapNeko/NapCat-Docker/actions/workflows/docker-publish.yml/dispatches \
|
||||||
|
-d '{"ref": "main"}'
|
||||||
|
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.7.77",
|
"version": "4.7.78",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
@@ -26,7 +26,7 @@ const itemVariants = {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
scale: 1,
|
scale: 1,
|
||||||
y: 0,
|
y: 0,
|
||||||
transition: { type: 'spring', stiffness: 300, damping: 20 }
|
transition: { type: 'spring' as const, stiffness: 300, damping: 20 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.7.77",
|
"version": "4.7.78",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
"build:universal": "npm run build:webui && vite build --mode universal || exit 1",
|
||||||
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
|
||||||
|
@@ -1 +1 @@
|
|||||||
export const napCatVersion = '4.7.77';
|
export const napCatVersion = '4.7.78';
|
||||||
|
8
src/core/external/appid.json
vendored
8
src/core/external/appid.json
vendored
@@ -314,5 +314,13 @@
|
|||||||
"9.9.20-35951": {
|
"9.9.20-35951": {
|
||||||
"appid": 537295977,
|
"appid": 537295977,
|
||||||
"qua": "V1_WIN_NQ_9.9.20_35951_GW_B"
|
"qua": "V1_WIN_NQ_9.9.20_35951_GW_B"
|
||||||
|
},
|
||||||
|
"3.2.18-36580": {
|
||||||
|
"appid": 537298509,
|
||||||
|
"qua": "V1_LNX_NQ_3.2.18_36580_GW_B"
|
||||||
|
},
|
||||||
|
"9.9.20-36580": {
|
||||||
|
"appid": 537298473,
|
||||||
|
"qua": "V1_WIN_NQ_9.9.20_36580_GW_B"
|
||||||
}
|
}
|
||||||
}
|
}
|
12
src/core/external/offset.json
vendored
12
src/core/external/offset.json
vendored
@@ -402,5 +402,17 @@
|
|||||||
"3.2.18-35951-x64": {
|
"3.2.18-35951-x64": {
|
||||||
"send": "AFBBB00",
|
"send": "AFBBB00",
|
||||||
"recv": "AFBF520"
|
"recv": "AFBF520"
|
||||||
|
},
|
||||||
|
"9.9.20-36580-x64": {
|
||||||
|
"send":"30824B8",
|
||||||
|
"recv":"3085C5C"
|
||||||
|
},
|
||||||
|
"3.2.18-36580-x64": {
|
||||||
|
"send": "B0853E0",
|
||||||
|
"recv": "B088E60"
|
||||||
|
},
|
||||||
|
"3.2.18-36580-arm64": {
|
||||||
|
"send": "793DAC8",
|
||||||
|
"recv": "7941458"
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -40,7 +40,8 @@ export class NativePacketClient extends IPacketClient {
|
|||||||
|
|
||||||
async init(_pid: number, recv: string, send: string): Promise<void> {
|
async init(_pid: number, recv: string, send: string): Promise<void> {
|
||||||
const platform = process.platform + '.' + process.arch;
|
const platform = process.platform + '.' + process.arch;
|
||||||
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + '.node');
|
const isNewQQ = this.napcore.basicInfo.requireMinNTQQBuild("36580");
|
||||||
|
const moehoo_path = path.join(dirname(fileURLToPath(import.meta.url)), './moehoo/MoeHoo.' + platform + (isNewQQ ? '.new' : '') + '.node');
|
||||||
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
process.dlopen(this.MoeHooExport, moehoo_path, constants.dlopen.RTLD_LAZY);
|
||||||
|
|
||||||
this.MoeHooExport.exports.InitHook?.(send, recv, (type: number, _uin: string, cmd: string, seq: number, hex_data: string) => {
|
this.MoeHooExport.exports.InitHook?.(send, recv, (type: number, _uin: string, cmd: string, seq: number, hex_data: string) => {
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
import { NapCatCore } from '@/core';
|
import { NapCatCore } from '@/core';
|
||||||
|
|
||||||
export interface NapCoreCompatBasicInfo {
|
export interface NapCoreCompatBasicInfo {
|
||||||
|
readonly requireMinNTQQBuild: (buildVer: string) => boolean;
|
||||||
readonly uin: number;
|
readonly uin: number;
|
||||||
readonly uid: string;
|
readonly uid: string;
|
||||||
readonly uin2uid: (uin: number) => Promise<string>;
|
readonly uin2uid: (uin: number) => Promise<string>;
|
||||||
@@ -21,6 +22,7 @@ export class NapCoreContext {
|
|||||||
|
|
||||||
get basicInfo() {
|
get basicInfo() {
|
||||||
return {
|
return {
|
||||||
|
requireMinNTQQBuild: (buildVer: string) => this.core.context.basicInfoWrapper.requireMinNTQQBuild(buildVer),
|
||||||
uin: +this.core.selfInfo.uin,
|
uin: +this.core.selfInfo.uin,
|
||||||
uid: this.core.selfInfo.uid,
|
uid: this.core.selfInfo.uid,
|
||||||
uin2uid: (uin: number) => this.core.apis.UserApi.getUidByUinV2(String(uin)).then(res => res ?? ''),
|
uin2uid: (uin: number) => this.core.apis.UserApi.getUidByUinV2(String(uin)).then(res => res ?? ''),
|
||||||
|
BIN
src/native/packet/MoeHoo.win32.x64.new.node
Normal file
BIN
src/native/packet/MoeHoo.win32.x64.new.node
Normal file
Binary file not shown.
@@ -4,6 +4,7 @@ import { ActionName } from '@/onebot/action/router';
|
|||||||
import { Notify } from '@/onebot/types';
|
import { Notify } from '@/onebot/types';
|
||||||
|
|
||||||
interface RetData {
|
interface RetData {
|
||||||
|
invited_requests: Notify[];
|
||||||
InvitedRequest: Notify[];
|
InvitedRequest: Notify[];
|
||||||
join_requests: Notify[];
|
join_requests: Notify[];
|
||||||
}
|
}
|
||||||
@@ -13,7 +14,7 @@ export class GetGroupIgnoredNotifies extends OneBotAction<void, RetData> {
|
|||||||
|
|
||||||
async _handle(): Promise<RetData> {
|
async _handle(): Promise<RetData> {
|
||||||
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, 50);
|
const SingleScreenNotifies = await this.core.apis.GroupApi.getSingleScreenNotifies(false, 50);
|
||||||
const retData: RetData = { InvitedRequest: [], join_requests: [] };
|
const retData: RetData = { invited_requests: [], InvitedRequest: [], join_requests: [] };
|
||||||
|
|
||||||
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
const notifyPromises = SingleScreenNotifies.map(async (SSNotify) => {
|
||||||
const invitorUin = SSNotify.user1?.uid ? +await this.core.apis.UserApi.getUinByUidV2(SSNotify.user1.uid) : 0;
|
const invitorUin = SSNotify.user1?.uid ? +await this.core.apis.UserApi.getUinByUidV2(SSNotify.user1.uid) : 0;
|
||||||
@@ -38,7 +39,7 @@ export class GetGroupIgnoredNotifies extends OneBotAction<void, RetData> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await Promise.all(notifyPromises);
|
await Promise.all(notifyPromises);
|
||||||
|
retData.invited_requests = retData.InvitedRequest;
|
||||||
return retData;
|
return retData;
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -121,6 +121,8 @@ import SetGroupSearch from './extends/SetGroupSearch';
|
|||||||
import SetGroupRobotAddOption from './extends/SetGroupRobotAddOption';
|
import SetGroupRobotAddOption from './extends/SetGroupRobotAddOption';
|
||||||
import SetGroupKickMembers from './extends/SetGroupKickMembers';
|
import SetGroupKickMembers from './extends/SetGroupKickMembers';
|
||||||
import { GetGroupDetailInfo } from './group/GetGroupDetailInfo';
|
import { GetGroupDetailInfo } from './group/GetGroupDetailInfo';
|
||||||
|
import GetGroupAddRequest from './extends/GetGroupAddRequest';
|
||||||
|
import { GetCollectionList } from './extends/GetCollectionList';
|
||||||
|
|
||||||
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCore) {
|
||||||
|
|
||||||
@@ -257,6 +259,8 @@ export function createActionMap(obContext: NapCatOneBot11Adapter, core: NapCatCo
|
|||||||
new GetPrivateFileUrl(obContext, core),
|
new GetPrivateFileUrl(obContext, core),
|
||||||
new GetUnidirectionalFriendList(obContext, core),
|
new GetUnidirectionalFriendList(obContext, core),
|
||||||
new CleanCache(obContext, core),
|
new CleanCache(obContext, core),
|
||||||
|
new GetGroupAddRequest(obContext, core),
|
||||||
|
new GetCollectionList(obContext, core),
|
||||||
];
|
];
|
||||||
|
|
||||||
type HandlerUnion = typeof actionHandlers[number];
|
type HandlerUnion = typeof actionHandlers[number];
|
||||||
|
Reference in New Issue
Block a user