mirror of
https://github.com/NapNeko/NapCatQQ.git
synced 2026-03-01 08:10:25 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ce51fb082 | ||
|
|
89e50be1e9 | ||
|
|
1259dcea5b | ||
|
|
b4900066b3 | ||
|
|
28acd94cbd | ||
|
|
7aedacb27f | ||
|
|
c9b45ec1a2 | ||
|
|
54cacc30e4 |
@@ -4,7 +4,7 @@
|
||||
"name": "NapCatQQ",
|
||||
"slug": "NapCat.Framework",
|
||||
"description": "高性能的 OneBot 11 协议实现",
|
||||
"version": "4.9.36",
|
||||
"version": "4.9.41",
|
||||
"icon": "./logo.png",
|
||||
"authors": [
|
||||
{
|
||||
|
||||
2
napcat.webui/public/robots.txt
Normal file
2
napcat.webui/public/robots.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "napcat",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"version": "4.9.36",
|
||||
"version": "4.9.41",
|
||||
"scripts": {
|
||||
"build:universal": "npm run build:webui && npm run dev:universal || exit 1",
|
||||
"build:framework": "npm run build:webui && npm run dev:framework || exit 1",
|
||||
|
||||
@@ -66,7 +66,7 @@ export class FFmpegAddonAdapter implements IFFmpegAdapter {
|
||||
*/
|
||||
async getVideoInfo (videoPath: string): Promise<VideoInfoResult> {
|
||||
const addon = this.ensureAddon();
|
||||
const info = await addon.getVideoInfo(videoPath, 'bmp24');
|
||||
const info = await addon.getVideoInfo(videoPath);
|
||||
|
||||
let format = info.format.includes(',') ? info.format.split(',')[0] ?? info.format : info.format;
|
||||
console.log('[FFmpegAddonAdapter] Detected format:', format);
|
||||
|
||||
@@ -1 +1 @@
|
||||
export const napCatVersion = '4.9.36';
|
||||
export const napCatVersion = '4.9.41';
|
||||
|
||||
@@ -12,4 +12,16 @@ export class NodeIDependsAdapter {
|
||||
getGroupCode (_args: unknown) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// onSendMsfReply (_seq: string, _cmd: string, _uk1: number, _uk2: string, _rsp: {
|
||||
// ssoRetCode: 0,
|
||||
// trpcRetCode: 0,
|
||||
// trpcFuncCode: 0,
|
||||
// errorMsg: '',
|
||||
// pbBuffer: Uint8Array,
|
||||
// transInfoMap: Map<unknown, unknown>;
|
||||
// }) {
|
||||
|
||||
// console.log('[NodeIDependsAdapter] onSendMsfReply', _seq, _cmd, _uk1, _uk2, Buffer.from(_rsp.pbBuffer).toString('hex'));
|
||||
// }
|
||||
}
|
||||
@@ -34,7 +34,7 @@ export class NTQQFileApi {
|
||||
context: InstanceContext;
|
||||
core: NapCatCore;
|
||||
rkeyManager: RkeyManager;
|
||||
packetRkey: Array<{ rkey: string; time: number; type: number; ttl: bigint }> | undefined;
|
||||
packetRkey: Array<{ rkey: string; time: number; type: number; ttl: bigint; }> | undefined;
|
||||
private fetchRkeyFailures: number = 0;
|
||||
private readonly MAX_RKEY_FAILURES: number = 8;
|
||||
|
||||
@@ -45,7 +45,7 @@ export class NTQQFileApi {
|
||||
'http://ss.xingzhige.com/music_card/rkey',
|
||||
'https://secret-service.bietiaop.com/rkeys',
|
||||
],
|
||||
this.context.logger
|
||||
this.context.logger
|
||||
);
|
||||
}
|
||||
|
||||
@@ -360,9 +360,9 @@ export class NTQQFileApi {
|
||||
m.elements
|
||||
.filter(element =>
|
||||
element.elementType === ElementType.PIC ||
|
||||
element.elementType === ElementType.VIDEO ||
|
||||
element.elementType === ElementType.PTT ||
|
||||
element.elementType === ElementType.FILE
|
||||
element.elementType === ElementType.VIDEO ||
|
||||
element.elementType === ElementType.PTT ||
|
||||
element.elementType === ElementType.FILE
|
||||
)
|
||||
.map(element =>
|
||||
this.downloadMedia(m.msgId, m.chatType, m.peerUid, element.elementId, '', '', 1000 * 60 * 2, true)
|
||||
@@ -376,9 +376,9 @@ export class NTQQFileApi {
|
||||
m.elements.forEach(element => {
|
||||
if (
|
||||
element.elementType === ElementType.PIC ||
|
||||
element.elementType === ElementType.VIDEO ||
|
||||
element.elementType === ElementType.PTT ||
|
||||
element.elementType === ElementType.FILE
|
||||
element.elementType === ElementType.VIDEO ||
|
||||
element.elementType === ElementType.PTT ||
|
||||
element.elementType === ElementType.FILE
|
||||
) {
|
||||
switch (element.elementType) {
|
||||
case ElementType.PIC:
|
||||
|
||||
12
src/core/external/appid.json
vendored
12
src/core/external/appid.json
vendored
@@ -454,5 +454,17 @@
|
||||
"6.9.83-41857": {
|
||||
"appid": 537320186,
|
||||
"qua": "V1_MAC_NQ_6.9.83_41857_GW_B"
|
||||
},
|
||||
"3.2.21-42086": {
|
||||
"appid": 537320248,
|
||||
"qua": "V1_LNX_NQ_3.2.21_42086_GW_B"
|
||||
},
|
||||
"9.9.23-42086": {
|
||||
"appid": 537320212,
|
||||
"qua": "V1_WIN_NQ_9.9.23_42086_GW_B"
|
||||
},
|
||||
"6.9.85-42086": {
|
||||
"appid": 537320237,
|
||||
"qua": "V1_MAC_NQ_6.9.85_42086_GW_B"
|
||||
}
|
||||
}
|
||||
12
src/core/external/napi2native.json
vendored
12
src/core/external/napi2native.json
vendored
@@ -78,5 +78,17 @@
|
||||
"9.9.23-41857-x64": {
|
||||
"send": "0A01394",
|
||||
"recv": "1D1C4F9"
|
||||
},
|
||||
"9.9.23-42086-x64": {
|
||||
"send": "0A01814",
|
||||
"recv": "1D1C9B9"
|
||||
},
|
||||
"6.9.85-42086-arm64": {
|
||||
"send": "23B0330",
|
||||
"recv": "0957648"
|
||||
},
|
||||
"3.2.21-42086-x64": {
|
||||
"send": "5B42CF0",
|
||||
"recv": "2FDA6F0"
|
||||
}
|
||||
}
|
||||
12
src/core/external/packet.json
vendored
12
src/core/external/packet.json
vendored
@@ -590,5 +590,17 @@
|
||||
"3.2.21-41857-arm64": {
|
||||
"send": "6B159F8",
|
||||
"recv": "6B19388"
|
||||
},
|
||||
"9.9.23-42086-x64": {
|
||||
"send": "2C99800",
|
||||
"recv": "2C9CD80"
|
||||
},
|
||||
"3.2.21-42086-x64": {
|
||||
"send": "A7B1060",
|
||||
"recv": "A7B4AE0"
|
||||
},
|
||||
"3.2.21-42086-arm64": {
|
||||
"send": "6B13038",
|
||||
"recv": "6B169C8"
|
||||
}
|
||||
}
|
||||
@@ -5,24 +5,24 @@ enum ProxyType {
|
||||
SOCKET = 2,
|
||||
}
|
||||
export interface NodeIKernelMSFService {
|
||||
getServerTime(): string;
|
||||
setNetworkProxy(param: {
|
||||
getServerTime (): string;
|
||||
setNetworkProxy (param: {
|
||||
userName: string,
|
||||
userPwd: string,
|
||||
address: string,
|
||||
port: number,
|
||||
proxyType: ProxyType,
|
||||
domain: string,
|
||||
isSocket: boolean
|
||||
isSocket: boolean;
|
||||
}): Promise<GeneralCallResult>;
|
||||
getNetworkProxy(): Promise<{
|
||||
getNetworkProxy (): Promise<{
|
||||
userName: string,
|
||||
userPwd: string,
|
||||
address: string,
|
||||
port: number,
|
||||
proxyType: ProxyType,
|
||||
domain: string,
|
||||
isSocket: boolean
|
||||
isSocket: boolean;
|
||||
}>;
|
||||
// http
|
||||
// userName: '',
|
||||
@@ -40,4 +40,14 @@ export interface NodeIKernelMSFService {
|
||||
// proxyType: 2,
|
||||
// domain: '',
|
||||
// isSocket: true
|
||||
sendMsfRequest (seq: string, cmd: string, reqData: Uint8Array, option: {
|
||||
sendTimeout: number,
|
||||
sendTimeoutOnSlowNet: number,
|
||||
resendNum: number,
|
||||
sendOptions: number,
|
||||
reqTargetAccountType: number,
|
||||
account: string,
|
||||
accountType: number,
|
||||
transInfoMap: Map<string, unknown>;
|
||||
}): Promise<Buffer>;
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -907,12 +907,12 @@ export class OneBotMsgApi {
|
||||
|
||||
async parsePrivateMsgEvent (msg: RawMessage, grayTipElement: GrayTipElement) {
|
||||
if (grayTipElement.subElementType === NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_JSON) {
|
||||
if (grayTipElement.jsonGrayTipElement.busiId === 1061) {
|
||||
if (grayTipElement.jsonGrayTipElement.busiId.toString() === '1061') {
|
||||
const PokeEvent = await this.obContext.apis.FriendApi.parsePrivatePokeEvent(grayTipElement, Number(await this.core.apis.UserApi.getUinByUidV2(msg.peerUid)));
|
||||
if (PokeEvent) {
|
||||
return PokeEvent;
|
||||
}
|
||||
} else if (grayTipElement.jsonGrayTipElement.busiId === 19324 && msg.peerUid !== '') {
|
||||
} else if (grayTipElement.jsonGrayTipElement.busiId.toString() === '19324' && msg.peerUid !== '') {
|
||||
return new OB11FriendAddNoticeEvent(this.core, Number(await this.core.apis.UserApi.getUinByUidV2(msg.peerUid)));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user