Skip to content

Commit

Permalink
try add reply to
Browse files Browse the repository at this point in the history
  • Loading branch information
asukaminato0721 committed Feb 7, 2025
1 parent b8817c8 commit a3c30ff
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,13 @@ ${results.map((r: any) => `${r.userName}: ${r.content} ${r.messageId == null ? "
const groupId = msg.chat.id;
let content = msg.text || "";
const fwd = msg.forward_from?.last_name;
const replyTo = msg.reply_to_message?.message_id;
if (fwd) {
content = `转发自 ${fwd}: ${content}`;
}
if (replyTo) {
content = `回复 ${getMessageLink({ groupId: groupId.toString(), messageId: replyTo })}: ${content}`;
}
if (content.startsWith("http") && !content.includes(" ")) {
content = await extractAllOGInfo(content);
}
Expand Down

0 comments on commit a3c30ff

Please sign in to comment.