fix: pair 没有判空

This commit is contained in:
Clansty 2024-02-12 23:10:22 +08:00
parent 6290edf0b0
commit e8e91c81ac
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 1 additions and 0 deletions

View File

@ -96,6 +96,7 @@ export default class ForwardController {
private onTelegramUserMessage = async (message: Api.Message) => {
if (!('bot' in message.sender) || !message.sender.bot) return;
const pair = this.instance.forwardPairs.find(message.chat);
if (!pair) return;
if ((pair.flags | this.instance.flags) & flags.NO_FORWARD_OTHER_BOT) return;
await this.onTelegramMessage(message, pair);
};