mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 00:00:26 +00:00
Compare commits
3 Commits
v4.8.119
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edc14763f0 | ||
|
|
6a6a0e0539 | ||
|
|
b930eea84f |
@@ -7,7 +7,7 @@ set NAPCAT_LAUNCHER_PATH=%cd%\NapCatWinBootMain.exe
|
|||||||
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%~b"
|
set RetString=%%b
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ for %%a in ("%RetString%") do (
|
|||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
SET QQPath=%pathWithoutUninstall%QQ.exe
|
||||||
|
|
||||||
if not exist "%QQpath%" (
|
if not exist "%QQpath%" (
|
||||||
echo provided QQ path is invalid
|
echo provided QQ path is invalid
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ set NAPCAT_LAUNCHER_PATH=%cd%\NapCatWinBootMain.exe
|
|||||||
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%~b"
|
set RetString=%%b
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -16,7 +16,7 @@ for %%a in ("%RetString%") do (
|
|||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
SET QQPath=%pathWithoutUninstall%QQ.exe
|
||||||
|
|
||||||
if not exist "%QQpath%" (
|
if not exist "%QQpath%" (
|
||||||
echo provided QQ path is invalid
|
echo provided QQ path is invalid
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ set NAPCAT_LAUNCHER_PATH=%cd%\NapCatWinBootMain.exe
|
|||||||
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%~b"
|
set RetString=%%b
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ for %%a in ("%RetString%") do (
|
|||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
SET QQPath=%pathWithoutUninstall%QQ.exe
|
||||||
|
|
||||||
if not exist "%QQPath%" (
|
if not exist "%QQPath%" (
|
||||||
echo provided QQ path is invalid
|
echo provided QQ path is invalid
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ set NAPCAT_LAUNCHER_PATH=%cd%\NapCatWinBootMain.exe
|
|||||||
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
set NAPCAT_MAIN_PATH=%cd%\napcat.mjs
|
||||||
:loop_read
|
:loop_read
|
||||||
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
for /f "tokens=2*" %%a in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\QQ" /v "UninstallString"') do (
|
||||||
set "RetString=%%~b"
|
set RetString=%%b
|
||||||
goto :napcat_boot
|
goto :napcat_boot
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ for %%a in ("%RetString%") do (
|
|||||||
set "pathWithoutUninstall=%%~dpa"
|
set "pathWithoutUninstall=%%~dpa"
|
||||||
)
|
)
|
||||||
|
|
||||||
set "QQPath=%pathWithoutUninstall%QQ.exe"
|
SET QQPath=%pathWithoutUninstall%QQ.exe
|
||||||
|
|
||||||
if not exist "%QQPath%" (
|
if not exist "%QQPath%" (
|
||||||
echo provided QQ path is invalid
|
echo provided QQ path is invalid
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
"name": "NapCatQQ",
|
"name": "NapCatQQ",
|
||||||
"slug": "NapCat.Framework",
|
"slug": "NapCat.Framework",
|
||||||
"description": "高性能的 OneBot 11 协议实现",
|
"description": "高性能的 OneBot 11 协议实现",
|
||||||
"version": "4.8.118",
|
"version": "4.8.116",
|
||||||
"icon": "./logo.png",
|
"icon": "./logo.png",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ export default function FileTable({
|
|||||||
setPreviewImages([])
|
setPreviewImages([])
|
||||||
setPreviewIndex(0)
|
setPreviewIndex(0)
|
||||||
setShowImage(false)
|
setShowImage(false)
|
||||||
setPage(1)
|
|
||||||
}, [currentPath])
|
}, [currentPath])
|
||||||
|
|
||||||
const onPreviewImage = (name: string, images: PreviewImage[]) => {
|
const onPreviewImage = (name: string, images: PreviewImage[]) => {
|
||||||
|
|||||||
@@ -171,8 +171,7 @@ const GenericForm = <T extends keyof NetworkConfigType>({
|
|||||||
|
|
||||||
export default GenericForm
|
export default GenericForm
|
||||||
export function random_token(length: number) {
|
export function random_token(length: number) {
|
||||||
const chars =
|
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()-_=+[]{}|;:,.<>?'
|
||||||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@#$%^&*()-_=+[]{}|;:,.<>?'
|
|
||||||
let result = ''
|
let result = ''
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
result += chars.charAt(Math.floor(Math.random() * chars.length))
|
result += chars.charAt(Math.floor(Math.random() * chars.length))
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import CryptoJS from 'crypto-js'
|
|
||||||
import { EventSourcePolyfill } from 'event-source-polyfill'
|
import { EventSourcePolyfill } from 'event-source-polyfill'
|
||||||
|
|
||||||
import { LogLevel } from '@/const/enum'
|
import { LogLevel } from '@/const/enum'
|
||||||
|
|
||||||
import { serverRequest } from '@/utils/request'
|
import { serverRequest } from '@/utils/request'
|
||||||
|
import CryptoJS from "crypto-js";
|
||||||
export interface Log {
|
export interface Log {
|
||||||
level: LogLevel
|
level: LogLevel
|
||||||
message: string
|
message: string
|
||||||
@@ -18,7 +17,7 @@ export default class WebUIManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async loginWithToken(token: string) {
|
public static async loginWithToken(token: string) {
|
||||||
const sha256 = CryptoJS.SHA256(token + '.napcat').toString()
|
const sha256 = CryptoJS.SHA256(token + '.napcat').toString();
|
||||||
const { data } = await serverRequest.post<ServerResponse<AuthResponse>>(
|
const { data } = await serverRequest.post<ServerResponse<AuthResponse>>(
|
||||||
'/auth/login',
|
'/auth/login',
|
||||||
{ hash: sha256 }
|
{ hash: sha256 }
|
||||||
|
|||||||
@@ -182,4 +182,4 @@ const ServerConfigCard = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default ServerConfigCard
|
export default ServerConfigCard
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "napcat",
|
"name": "napcat",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"version": "4.8.118",
|
"version": "4.8.116",
|
||||||
"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.8.118';
|
export const napCatVersion = '4.8.116';
|
||||||
|
|||||||
4
src/core/external/appid.json
vendored
4
src/core/external/appid.json
vendored
@@ -386,9 +386,5 @@
|
|||||||
"9.9.21-39038": {
|
"9.9.21-39038": {
|
||||||
"appid": 537313906,
|
"appid": 537313906,
|
||||||
"qua": "V1_WIN_NQ_9.9.21_39038_GW_B"
|
"qua": "V1_WIN_NQ_9.9.21_39038_GW_B"
|
||||||
},
|
|
||||||
"9.9.22-40362": {
|
|
||||||
"appid": 537314212,
|
|
||||||
"qua": "V1_WIN_NQ_9.9.22_40362_GW_B"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
6
src/core/external/offset.json
vendored
6
src/core/external/offset.json
vendored
@@ -507,12 +507,8 @@
|
|||||||
"send": "7B025C8",
|
"send": "7B025C8",
|
||||||
"recv": "7B05F58"
|
"recv": "7B05F58"
|
||||||
},
|
},
|
||||||
"9.9.21-39038-x64": {
|
"9.9.21-39038-x64": {
|
||||||
"send": "313FB58",
|
"send": "313FB58",
|
||||||
"recv": "31432FC"
|
"recv": "31432FC"
|
||||||
},
|
|
||||||
"9.9.22-40362-x64": {
|
|
||||||
"send": "31C0EB8",
|
|
||||||
"recv": "31C465C"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -116,6 +116,17 @@ export class OneBotGroupApi {
|
|||||||
const member = await this.core.apis.GroupApi.getGroupMember(msg.peerUid, msg.senderUin);
|
const member = await this.core.apis.GroupApi.getGroupMember(msg.peerUid, msg.senderUin);
|
||||||
if (member && member.cardName !== msg.sendMemberName) {
|
if (member && member.cardName !== msg.sendMemberName) {
|
||||||
const newCardName = msg.sendMemberName ?? '';
|
const newCardName = msg.sendMemberName ?? '';
|
||||||
|
// 防止误触:如果消息包含转发元素且新名片为空,不触发事件(转发消息的sendMemberName不可靠)
|
||||||
|
const hasForwardElement = msg.elements.some(e => e.multiForwardMsgElement || e.arkElement);
|
||||||
|
if (newCardName === '' && member.cardName !== '' && hasForwardElement) {
|
||||||
|
this.core.context.logger.logDebug('忽略转发消息的不可靠群名片变更事件', {
|
||||||
|
peerUid: msg.peerUid,
|
||||||
|
senderUin: msg.senderUin,
|
||||||
|
oldCard: member.cardName,
|
||||||
|
newCard: newCardName
|
||||||
|
});
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
const event = new OB11GroupCardEvent(this.core, parseInt(msg.peerUid), parseInt(msg.senderUin), newCardName, member.cardName);
|
const event = new OB11GroupCardEvent(this.core, parseInt(msg.peerUid), parseInt(msg.senderUin), newCardName, member.cardName);
|
||||||
member.cardName = newCardName;
|
member.cardName = newCardName;
|
||||||
return event;
|
return event;
|
||||||
|
|||||||
@@ -578,7 +578,7 @@ export class OneBotMsgApi {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!context.peer || !atQQ || context.peer.chatType == ChatType.KCHATTYPEC2C) return undefined; // 过滤掉空atQQ
|
if (!context.peer || context.peer.chatType == ChatType.KCHATTYPEC2C) return undefined;
|
||||||
if (atQQ === 'all') return at(atQQ, atQQ, NTMsgAtType.ATTYPEALL, '全体成员');
|
if (atQQ === 'all') return at(atQQ, atQQ, NTMsgAtType.ATTYPEALL, '全体成员');
|
||||||
const atMember = await this.core.apis.GroupApi.getGroupMember(context.peer.peerUid, atQQ);
|
const atMember = await this.core.apis.GroupApi.getGroupMember(context.peer.peerUid, atQQ);
|
||||||
if (atMember) {
|
if (atMember) {
|
||||||
|
|||||||
Reference in New Issue
Block a user