Skip to content

Commit a5d9d2f

Browse files
authored
Merge pull request #756 from LLOneBot/dev
chore: update version to 7.12.11
2 parents 735b123 + d5f363f commit a5d9d2f

7 files changed

Lines changed: 45 additions & 8 deletions

File tree

doc/更新日志.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
V7.12.11
2+
更新时间 2026-05-03
3+
4+
* OneBot 修复 send_group_ai_record API 返回无效的 message_id
5+
6+
=================
17
V7.12.10
28
更新时间 2026-04-30
39

package-dist.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"name":"llonebot-dist","version":"7.12.10","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}
1+
{"name":"llonebot-dist","version":"7.12.11","type":"module","description":"","main":"llbot.js","author":"linyuchen","repository":{"type":"git","url":"https://github.com/LLOneBot/LuckyLilliaBot"}}

src/main/pmhq/mixins/message.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,17 @@ export function MessageMixin<T extends new (...args: any[]) => PMHQBase>(Base: T
6363
}
6464

6565
async getGroupGenerateAiRecord(groupId: number, character: string, text: string, chatType: number) {
66+
const msgRandom = randomBytes(4).readUInt32BE(0)
6667
const body = Oidb.GetGroupGenerateAiRecordReq.encode({
6768
groupId,
6869
voiceId: character,
6970
text,
7071
chatType,
71-
clientMsgInfo: { msgRandom: randomBytes(4).readUInt32BE(0) },
72+
clientMsgInfo: { msgRandom },
7273
})
7374
const data = Oidb.Base.encode({ command: 0x929b, subCommand: 0, body })
7475
await this.httpSendPB('OidbSvcTrpcTcp.0x929b_0', data)
76+
return { msgRandom }
7577
}
7678
}
7779
}

src/ntqqapi/services/NodeIKernelMsgService.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,4 +168,20 @@ export interface NodeIKernelMsgService {
168168
setContactLocalTop(peer: Peer, isTop: boolean): Promise<GeneralCallResult>
169169

170170
sendShowInputStatusReq(chatType: ChatType, eventType: number, toUid: string): Promise<GeneralCallResult>
171+
172+
clickInlineKeyboardButton(inlineKeyboardClickInfo: {
173+
guildId: string
174+
dmFlag: number
175+
peerId: string
176+
chatType: ChatType
177+
botAppid: string
178+
msgSeq: string
179+
buttonId: string
180+
callback_data: string
181+
}): Promise<GeneralCallResult & {
182+
status: number
183+
promptText: string
184+
promptType: number
185+
promptIcon: number
186+
}>
171187
}

src/onebot11/action/llbot/msg/SendGroupAiRecord.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,16 @@ export class SendGroupAiRecord extends BaseAction<Payload, Response> {
2222
})
2323

2424
async _handle(payload: Payload) {
25-
await this.ctx.pmhq.getGroupGenerateAiRecord(+payload.group_id, payload.character, payload.text, +payload.chat_type)
26-
return { message_id: 0 }
25+
const res = await this.ctx.pmhq.getGroupGenerateAiRecord(+payload.group_id, payload.character, payload.text, +payload.chat_type)
26+
const targetMsgRandom = res.msgRandom.toString()
27+
const { promise, resolve } = Promise.withResolvers<Response>()
28+
const dispose = this.ctx.on('nt/message-created', (msg) => {
29+
if (msg.msgRandom === targetMsgRandom) {
30+
dispose()
31+
const shortId = this.ctx.store.createMsgShortId(msg)
32+
resolve({ message_id: shortId })
33+
}
34+
})
35+
return promise
2736
}
2837
}

src/onebot11/entities.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,12 +274,16 @@ export namespace OB11Entities {
274274
} else {
275275
operatorUin = await ctx.ntUserApi.getUinByUid(revokeElement.operatorUid)
276276
}
277-
if (msg.senderUin === '0' || !msg.senderUin) {
278-
ctx.logger.warn(`发生异常 senderUin: ${msg.senderUin}`)
277+
let senderUin = msg.senderUin
278+
if (msg.senderUin === '0') {
279+
senderUin = await ctx.ntUserApi.getUinByUid(revokeElement.origMsgSenderUid)
280+
if (revokeElement.operatorUid === revokeElement.origMsgSenderUid) {
281+
operatorUin = senderUin
282+
}
279283
}
280284
return new OB11GroupRecallNoticeEvent(
281285
Number(msg.peerUid),
282-
Number(msg.senderUin),
286+
Number(senderUin),
283287
Number(operatorUin),
284288
shortId,
285289
)

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '7.12.10'
1+
export const version = '7.12.11'

0 commit comments

Comments
 (0)