Compare commits

...
6 Commits
Author SHA1 Message Date
手瓜一十雪 06eba28b4c fux: #574
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
2024-11-28 15:28:09 +08:00
手瓜一十雪 bbfeac46dd Merge branch 'main' of https://github.com/NapNeko/NapCatQQ 2024-11-28 15:27:26 +08:00
手瓜一十雪 2fe4da094a fix 2024-11-28 15:14:01 +08:00
Mlikiowa b454d8c0f9 release: v4.2.5 2024-11-28 07:07:10 +00:00
手瓜一十雪 1f9b5453cc fix: #573
Build Action / Build-LiteLoader (push) Canceled after 0s
Build Action / Build-Shell (push) Canceled after 0s
Build Release / check-version (push) Canceled after 0s
Build Release / Build-LiteLoader (push) Canceled after 0s
Build Release / Build-Shell (push) Canceled after 0s
Build Release / release-napcat (push) Canceled after 0s
2024-11-28 15:06:47 +08:00
Mlikiowa 3261791e99 release: v4.2.4 2024-11-28 03:00:35 +00:00
6 changed files with 37 additions and 38 deletions

No files matched your search

+1 -1
View File
@@ -34,7 +34,7 @@ NapCatQQ 是现代化的基于 NTQQ 的 Bot 协议端实现
## 回家旅途
[QQ Group](https://qm.qq.com/q/NWP25OeV0c)
[QQ Group](https://qm.qq.com/q/I6LU87a0Yq)
## 感谢他们
感谢 [Lagrange](https://github.com/LagrangeDev/Lagrange.Core) 对本项目的大力支持 参考部分代码 已获授权
+1 -1
View File
@@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "4.2.3",
"version": "4.2.5",
"icon": "./logo.png",
"authors": [
{
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "4.2.3",
"version": "4.2.5",
"scripts": {
"build:framework": "npm run build:webui && vite build --mode framework || exit 1",
"build:shell": "npm run build:webui && vite build --mode shell || exit 1",
+1 -1
View File
@@ -1 +1 @@
export const napCatVersion = '4.2.3';
export const napCatVersion = '4.2.5';
+24 -25
View File
@@ -66,31 +66,31 @@ export class OneBotGroupApi {
return undefined;
}
async parseGroupIncreaseEvent(GroupCode: string, grayTipElement: GrayTipElement) {
this.core.context.logger.logDebug('收到新人被邀请进群消息', grayTipElement);
const xmlElement = grayTipElement.xmlElement;
if (xmlElement?.content) {
const regex = /jp="(\d+)"/g;
// async parseGroupIncreaseEvent(GroupCode: string, grayTipElement: GrayTipElement) {
// this.core.context.logger.logDebug('收到新人被邀请进群消息', grayTipElement);
// const xmlElement = grayTipElement.xmlElement;
// if (xmlElement?.content) {
// const regex = /jp="(\d+)"/g;
const matches = [];
let match = null;
// const matches = [];
// let match = null;
while ((match = regex.exec(xmlElement.content)) !== null) {
matches.push(match[1]);
}
if (matches.length === 2) {
const [inviter, invitee] = matches;
return new OB11GroupIncreaseEvent(
this.core,
parseInt(GroupCode),
parseInt(invitee),
parseInt(inviter),
'invite',
);
}
}
return undefined;
}
// while ((match = regex.exec(xmlElement.content)) !== null) {
// matches.push(match[1]);
// }
// if (matches.length === 2) {
// const [inviter, invitee] = matches;
// return new OB11GroupIncreaseEvent(
// this.core,
// parseInt(GroupCode),
// parseInt(invitee),
// parseInt(inviter),
// 'invite',
// );
// }
// }
// return undefined;
// }
// async parseGroupMemberIncreaseEvent(GroupCode: string, grayTipElement: GrayTipElement) {
// const groupElement = grayTipElement?.groupElement;
@@ -304,9 +304,8 @@ export class OneBotGroupApi {
// 筛选出表情回应 事件
if (grayTipElement.xmlElement?.templId === '10382') {
return await this.obContext.apis.GroupApi.parseGroupEmojiLikeEventByGrayTip(msg.peerUid, grayTipElement);
} else {
return await this.obContext.apis.GroupApi.parseGroupIncreaseEvent(msg.peerUid, grayTipElement);
//return await this.obContext.apis.GroupApi.parseGroupIncreaseEvent(msg.peerUid, grayTipElement);
}
} else if (grayTipElement.subElementType == NTGrayTipElementSubTypeV2.GRAYTIP_ELEMENT_SUBTYPE_JSON) {
// 解析json事件
+9 -9
View File
@@ -959,14 +959,14 @@ export class OneBotMsgApi {
}
groupChangDecreseType2String(type: number): GroupDecreaseSubType {
switch (type) {
case 130:
return 'kick';
case 131:
return 'leave';
case 3:
return 'kick_me';
default:
return 'kick';
case 130:
return 'leave';
case 131:
return 'kick';
case 3:
return 'kick_me';
default:
return 'kick';
}
}
@@ -988,7 +988,7 @@ export class OneBotMsgApi {
return new OB11GroupDecreaseEvent(
this.core,
groupChange.groupUin,
+this.core.selfInfo.uin,
groupChange.memberUid ? +await this.core.apis.UserApi.getUinByUidV2(groupChange.memberUid) : 0,
groupChange.operatorUid ? +await this.core.apis.UserApi.getUinByUidV2(groupChange.operatorUid) : 0,
this.groupChangDecreseType2String(groupChange.decreaseType),
);