This commit is contained in:
手瓜一十雪
2024-09-03 13:20:10 +08:00
parent 879a32ed2e
commit edacdadee2
7 changed files with 9 additions and 5 deletions

View File

@@ -1 +1 @@
export const napCatVersion = '2.2.40';
export const napCatVersion = '2.2.41';

View File

@@ -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);

View File

@@ -8,6 +8,7 @@ export enum OB11MessageType {
}
export interface OB11Message {
message_sent_type?: string;
target_id?: number; // 自己发送的消息才有此字段
self_id?: number,
time: number,

View File

@@ -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([