mirror of https://github.com/Nofated095/Q2TG.git
fix: pair 没有判空
This commit is contained in:
parent
6290edf0b0
commit
e8e91c81ac
|
@ -96,6 +96,7 @@ export default class ForwardController {
|
||||||
private onTelegramUserMessage = async (message: Api.Message) => {
|
private onTelegramUserMessage = async (message: Api.Message) => {
|
||||||
if (!('bot' in message.sender) || !message.sender.bot) return;
|
if (!('bot' in message.sender) || !message.sender.bot) return;
|
||||||
const pair = this.instance.forwardPairs.find(message.chat);
|
const pair = this.instance.forwardPairs.find(message.chat);
|
||||||
|
if (!pair) return;
|
||||||
if ((pair.flags | this.instance.flags) & flags.NO_FORWARD_OTHER_BOT) return;
|
if ((pair.flags | this.instance.flags) & flags.NO_FORWARD_OTHER_BOT) return;
|
||||||
await this.onTelegramMessage(message, pair);
|
await this.onTelegramMessage(message, pair);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue