Compare commits

..

8 Commits

Author SHA1 Message Date
手瓜一十雪
055e43845e feat: ffmpeg下载来源更换 2025-05-11 11:23:43 +08:00
Mlikiowa
d67270f2f8 release: v4.7.57 2025-05-10 13:15:37 +00:00
手瓜一十雪
d061b6c190 feat: 34958 2025-05-10 21:15:07 +08:00
Mlikiowa
945f87d77f release: v4.7.56 2025-05-09 11:28:05 +00:00
手瓜一十雪
6c9be52d39 feat: 34740 2025-05-09 19:16:25 +08:00
手瓜一十雪
98e347f010 fix: 过滤掉已读 2025-05-09 18:51:00 +08:00
手瓜一十雪
607e367bb1 fix 2025-05-09 13:17:47 +08:00
Mlikiowa
7a25dc1ef1 release: v4.7.55 2025-05-08 10:11:36 +00:00
15 changed files with 67 additions and 51 deletions

Binary file not shown.

BIN
external/logo.png vendored

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 250 KiB

View File

@@ -1,9 +1,9 @@
{ {
"name": "qq-chat", "name": "qq-chat",
"version": "9.9.18-32869", "version": "9.9.19-34740",
"verHash": "e735296c", "verHash": "f31348f2",
"linuxVersion": "3.2.16-32869", "linuxVersion": "3.2.17-34740",
"linuxVerHash": "4c192ba9", "linuxVerHash": "5aa2d8d6",
"private": true, "private": true,
"description": "QQ", "description": "QQ",
"productName": "QQ", "productName": "QQ",
@@ -16,27 +16,10 @@
"bin": { "bin": {
"qd": "externals/devtools/cli/index.js" "qd": "externals/devtools/cli/index.js"
}, },
"appid": {
"win32": "537258389",
"darwin": "537258412",
"linux": "537258424"
},
"main": "./loadNapCat.js", "main": "./loadNapCat.js",
"peerDependenciesMeta": { "buildVersion": "34740",
"*": {
"optional": true
}
},
"pnpm": {
"patchedDependencies": {
"@vue/runtime-dom@3.5.12": "patches/@vue__runtime-dom@3.5.12.patch",
"@swc/helpers@0.5.3": "patches/@swc__helpers@0.5.3.patch",
"vuex@4.1.0": "patches/vuex@4.1.0.patch"
}
},
"buildVersion": "32869",
"isPureShell": true, "isPureShell": true,
"isByteCodeShell": true, "isByteCodeShell": true,
"platform": "win32", "platform": "win32",
"eleArch": "x64" "eleArch": "x64"
} }

View File

@@ -4,7 +4,7 @@
"name": "NapCatQQ", "name": "NapCatQQ",
"slug": "NapCat.Framework", "slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现", "description": "高性能的 OneBot 11 协议实现",
"version": "4.7.51", "version": "4.7.57",
"icon": "./logo.png", "icon": "./logo.png",
"authors": [ "authors": [
{ {

View File

@@ -2,7 +2,7 @@
"name": "napcat", "name": "napcat",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "4.7.51", "version": "4.7.57",
"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",

View File

@@ -8,11 +8,12 @@ import { pipeline } from 'stream/promises';
import { fileURLToPath } from 'url'; import { fileURLToPath } from 'url';
import { LogWrapper } from './log'; import { LogWrapper } from './log';
const downloadOri = "https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2025-04-16-12-54/ffmpeg-n7.1.1-6-g48c0f071d4-win64-lgpl-7.1.zip" const downloadOri = "https://github.com/NapNeko/ffmpeg-build/releases/download/v1.0.0/ffmpeg-7.1.1-win64.zip"
const urls = [ const urls = [
"https://github.moeyy.xyz/" + downloadOri, "https://github.moeyy.xyz/" + downloadOri,
"https://ghp.ci/" + downloadOri, "https://ghp.ci/" + downloadOri,
"https://gh.api.99988866.xyz/" + downloadOri, "https://gh.api.99988866.xyz/" + downloadOri,
"https://gh.api.99988866.xyz/" + downloadOri,
downloadOri downloadOri
]; ];
@@ -336,9 +337,16 @@ export async function downloadFFmpegIfNotExists(log: LogWrapper) {
const ffprobe_exist = fs.existsSync(path.join(currentPath, 'ffmpeg', 'ffprobe.exe')); const ffprobe_exist = fs.existsSync(path.join(currentPath, 'ffmpeg', 'ffprobe.exe'));
if (!ffmpeg_exist || !ffprobe_exist) { if (!ffmpeg_exist || !ffprobe_exist) {
await downloadFFmpeg(path.join(currentPath, 'ffmpeg'), path.join(currentPath, 'cache'), (percentage: number, message: string) => { let url = await downloadFFmpeg(path.join(currentPath, 'ffmpeg'), path.join(currentPath, 'cache'), (percentage: number, message: string) => {
log.log(`[FFmpeg] [Download] ${percentage}% - ${message}`); log.log(`[FFmpeg] [Download] ${percentage}% - ${message}`);
}); });
if (!url) {
log.log('[FFmpeg] [Error] 下载FFmpeg失败');
return {
path: null,
reset: false
};
}
return { return {
path: path.join(currentPath, 'ffmpeg'), path: path.join(currentPath, 'ffmpeg'),
reset: true reset: true

View File

@@ -1 +1 @@
export const napCatVersion = '4.7.51'; export const napCatVersion = '4.7.57';

View File

@@ -282,5 +282,9 @@
"3.2.17-34740": { "3.2.17-34740": {
"appid": 537290727, "appid": 537290727,
"qua": "V1_LNX_NQ_3.2.17_34740_GW_B" "qua": "V1_LNX_NQ_3.2.17_34740_GW_B"
},
"9.9.19-34958": {
"appid": 537290742,
"qua": "V1_WIN_NQ_9.9.19_34958_GW_B"
} }
} }

View File

@@ -354,5 +354,17 @@
"9.9.19-34740-x64": { "9.9.19-34740-x64": {
"send": "3BDD8D0", "send": "3BDD8D0",
"recv": "3BE20D0" "recv": "3BE20D0"
},
"3.2.17-34740-x64": {
"send": "ADDF0A0",
"recv": "ADE2AC0"
},
"3.2.17-34740-arm64": {
"send": "7753BB8",
"recv": "77574E8"
},
"9.9.19-34958-x64": {
"send": "3BDD8D0",
"recv": "3BE20D0"
} }
} }

View File

@@ -3,43 +3,43 @@ import { BuddyCategoryType, FriendRequestNotify } from '@/core/types';
export type OnBuddyChangeParams = BuddyCategoryType[]; export type OnBuddyChangeParams = BuddyCategoryType[];
export class NodeIKernelBuddyListener { export class NodeIKernelBuddyListener {
onBuddyListChangedV2(arg: unknown): any { onBuddyListChangedV2(_arg: unknown): any {
} }
onAddBuddyNeedVerify(arg: unknown): any { onAddBuddyNeedVerify(_arg: unknown): any {
} }
onAddMeSettingChanged(arg: unknown): any { onAddMeSettingChanged(_arg: unknown): any {
} }
onAvatarUrlUpdated(arg: unknown): any { onAvatarUrlUpdated(_arg: unknown): any {
} }
onBlockChanged(arg: unknown): any { onBlockChanged(_arg: unknown): any {
} }
onBuddyDetailInfoChange(arg: unknown): any { onBuddyDetailInfoChange(_arg: unknown): any {
} }
onBuddyInfoChange(arg: unknown): any { onBuddyInfoChange(_arg: unknown): any {
} }
onBuddyListChange(arg: OnBuddyChangeParams): any { onBuddyListChange(_arg: OnBuddyChangeParams): any {
} }
onBuddyRemarkUpdated(arg: unknown): any { onBuddyRemarkUpdated(_arg: unknown): any {
} }
onBuddyReqChange(arg: FriendRequestNotify): any { onBuddyReqChange(_arg: FriendRequestNotify): any {
} }
onBuddyReqUnreadCntChange(arg: unknown): any { onBuddyReqUnreadCntChange(_arg: unknown): any {
} }
onCheckBuddySettingResult(arg: unknown): any { onCheckBuddySettingResult(_arg: unknown): any {
} }
onDelBatchBuddyInfos(arg: unknown): any { onDelBatchBuddyInfos(_arg: unknown): any {
console.log('onDelBatchBuddyInfos not implemented', ...arguments); console.log('onDelBatchBuddyInfos not implemented', ...arguments);
} }
@@ -66,12 +66,12 @@ export class NodeIKernelBuddyListener {
onDoubtBuddyReqUnreadNumChange(_num: number): void | Promise<void> { onDoubtBuddyReqUnreadNumChange(_num: number): void | Promise<void> {
} }
onNickUpdated(arg: unknown): any { onNickUpdated(_arg: unknown): any {
} }
onSmartInfos(arg: unknown): any { onSmartInfos(_arg: unknown): any {
} }
onSpacePermissionInfos(arg: unknown): any { onSpacePermissionInfos(_arg: unknown): any {
} }
} }

View File

@@ -249,7 +249,7 @@ export interface NodeIKernelGroupService {
reqToJoinGroup(groupCode: string, arg: unknown): void; reqToJoinGroup(groupCode: string, arg: unknown): void;
setGroupShutUp(groupCode: string, shutUp: boolean): void; setGroupShutUp(groupCode: string, shutUp: boolean): Promise<GeneralCallResult>;
getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>; getGroupShutUpMemberList(groupCode: string): Promise<GeneralCallResult>;

View File

@@ -132,18 +132,26 @@ export enum BuddyReqType {
KMEINITIATORWAITPEERCONFIRM = 13 KMEINITIATORWAITPEERCONFIRM = 13
} }
// 其中 ? 代表新版本参数
export interface FriendRequest { export interface FriendRequest {
isBuddy?: boolean;
isInitiator?: boolean; isInitiator?: boolean;
isDecide: boolean; isDecide: boolean;
friendUid: string; friendUid: string;
reqType: BuddyReqType, reqType: BuddyReqType,
reqTime: string; // 时间戳 秒 reqTime: string; // 时间戳 秒
flag?: number; // 0
preGroupingId?: number; // 0
commFriendNum?: number; // 共同好友数
extWords: string; // 申请人填写的验证消息 extWords: string; // 申请人填写的验证消息
isUnread: boolean; isUnread: boolean;
isDoubt?: boolean; // 是否是可疑的好友请求
nameMore?: string;
friendNick: string; friendNick: string;
sourceId: number; sourceId: number;
groupCode: string groupCode: string;
isBuddy?: boolean;
isAgreed?: boolean;
relation?: number;
} }
export interface FriendRequestNotify { export interface FriendRequestNotify {

View File

@@ -15,7 +15,10 @@ export default class SetGroupWholeBan extends OneBotAction<Payload, null> {
async _handle(payload: Payload): Promise<null> { async _handle(payload: Payload): Promise<null> {
const enable = payload.enable?.toString() !== 'false'; const enable = payload.enable?.toString() !== 'false';
await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable); let res = await this.core.apis.GroupApi.banGroup(payload.group_id.toString(), enable);
if (res.result !== 0) {
throw new Error(`SetGroupWholeBan failed: ${res.errMsg} ${res.result}`);
}
return null; return null;
} }
} }

View File

@@ -334,7 +334,7 @@ export class NapCatOneBot11Adapter {
for (let i = 0; i < reqs.unreadNums; i++) { for (let i = 0; i < reqs.unreadNums; i++) {
const req = reqs.buddyReqs[i]; const req = reqs.buddyReqs[i];
if (!req) continue; if (!req) continue;
if (!!req.isInitiator || (req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM)) { if (!!req.isInitiator || (req.isDecide && req.reqType !== BuddyReqType.KMEINITIATORWAITPEERCONFIRM) || !req.isUnread) {
continue; continue;
} }
try { try {
@@ -352,7 +352,6 @@ export class NapCatOneBot11Adapter {
} }
} }
}; };
this.context.session this.context.session
.getBuddyService() .getBuddyService()
.addKernelBuddyListener(proxiedListenerOf(buddyListener, this.context.logger)); .addKernelBuddyListener(proxiedListenerOf(buddyListener, this.context.logger));

View File

@@ -12,7 +12,6 @@ import { Writable } from 'stream';
export function connectToNamedPipe(logger: LogWrapper, timeoutMs: number = 5000): Promise<{ disconnect: () => void }> { export function connectToNamedPipe(logger: LogWrapper, timeoutMs: number = 5000): Promise<{ disconnect: () => void }> {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if (process.platform !== 'win32') { if (process.platform !== 'win32') {
logger.log('只有Windows平台支持命名管道');
// 非Windows平台不reject而是返回一个空的disconnect函数 // 非Windows平台不reject而是返回一个空的disconnect函数
return resolve({ disconnect: () => { } }); return resolve({ disconnect: () => { } });
} }