Skip to content

Commit

Permalink
fix: #334
Browse files Browse the repository at this point in the history
  • Loading branch information
MliKiowa committed Sep 3, 2024
1 parent 5a986ba commit 30d0174
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "NapCatQQ",
"slug": "NapCat.Framework",
"description": "高性能的 OneBot 11 协议实现",
"version": "2.2.40",
"version": "2.2.41",
"icon": "./logo.png",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "napcat",
"private": true,
"type": "module",
"version": "2.2.40",
"version": "2.2.41",
"scripts": {
"build:framework": "vite build --mode framework",
"build:shell": "vite build --mode shell",
Expand Down
2 changes: 1 addition & 1 deletion src/common/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const napCatVersion = '2.2.40';
export const napCatVersion = '2.2.41';
3 changes: 3 additions & 0 deletions src/onebot/api/msg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,6 +709,9 @@ export class OneBotMsgApi {
message_format: messagePostFormat === 'string' ? 'string' : 'array',
post_type: this.core.selfInfo.uin == msg.senderUin ? EventType.MESSAGE_SENT : EventType.MESSAGE,
};
if (this.core.selfInfo.uin == msg.senderUin) {
resMsg.message_sent_type = 'self';
}
if (msg.chatType == ChatType.KCHATTYPEGROUP) {
resMsg.sub_type = 'normal'; // 这里go-cqhttp是group,而onebot11标准是normal, 蛋疼
resMsg.group_id = parseInt(msg.peerUin);
Expand Down
1 change: 1 addition & 0 deletions src/onebot/types/message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export enum OB11MessageType {
}

export interface OB11Message {
message_sent_type?: string;
target_id?: number; // 自己发送的消息才有此字段
self_id?: number,
time: number,
Expand Down
2 changes: 1 addition & 1 deletion src/webui/ui/NapCat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ async function onSettingWindowCreated(view: Element) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
undefined,
SettingButton('V2.2.40', 'napcat-update-button', 'secondary'),
SettingButton('V2.2.41', 'napcat-update-button', 'secondary'),
),
]),
SettingList([
Expand Down
2 changes: 1 addition & 1 deletion static/assets/renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ async function onSettingWindowCreated(view) {
SettingItem(
'<span id="napcat-update-title">Napcat</span>',
void 0,
SettingButton("V2.2.40", "napcat-update-button", "secondary")
SettingButton("V2.2.41", "napcat-update-button", "secondary")
)
]),
SettingList([
Expand Down

0 comments on commit 30d0174

Please sign in to comment.