Skip to content

Commit

Permalink
fix: icqq私聊回复消息中第一个消息段丢失
Browse files Browse the repository at this point in the history
  • Loading branch information
MarryDream committed Jan 22, 2024
1 parent 4822a3f commit 5706e55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/adapters/icqq/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,19 @@ export default class IcqqAdapter extends Adapter<"icqq"> {
data.source?.rand,
data.source?.time,
);
data.message[0] = {
const replyEl = {
type: "reply",
id:
version === "V11"
? oneBot.V11.transformToInt("message_id", message_id)
: message_id,
};
/* 去除群聊消息的第一个引用消息段 */
if (result.detail_type === "group" && data.message[0]?.type === "at") {
data.message[0] = replyEl;
} else {
data.message.unshift(replyEl);
}
}
if (version === "V11" && result.message_id) {
result.message_id = oneBot.V11.transformToInt("message_id", result.message_id);
Expand Down

0 comments on commit 5706e55

Please sign in to comment.