mirror of https://github.com/Nofated095/Q2TG.git
fix: 机器人自己的提示消息在编辑时也被转发
This commit is contained in:
parent
543af1e63a
commit
0a44565fad
|
@ -33,6 +33,7 @@ export default class DeleteMessageController {
|
|||
};
|
||||
|
||||
private onTelegramEditMessage = async (message: Api.Message) => {
|
||||
if (message.senderId?.eq(this.instance.botMe.id)) return true;
|
||||
const pair = this.instance.forwardPairs.find(message.chat);
|
||||
if (!pair) return;
|
||||
await this.deleteMessageService.telegramDeleteMessage(message.id, pair);
|
||||
|
|
|
@ -53,6 +53,7 @@ export default class ForwardController {
|
|||
|
||||
private onTelegramMessage = async (message: Api.Message) => {
|
||||
try {
|
||||
if (message.senderId?.eq(this.instance.botMe.id)) return true;
|
||||
const pair = this.instance.forwardPairs.find(message.chat);
|
||||
if (!pair) return false;
|
||||
const qqMessagesSent = await this.forwardService.forwardFromTelegram(message, pair);
|
||||
|
|
Loading…
Reference in New Issue