Skip to content

Commit

Permalink
fix: TypeError: Cannot use 'in' operator to search for 'bot' in undef…
Browse files Browse the repository at this point in the history
…ined
  • Loading branch information
clansty committed Feb 29, 2024
1 parent 3dfdabd commit c7368c5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main/src/controllers/ForwardController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export default class ForwardController {
};

private onTelegramUserMessage = async (message: Api.Message) => {
if (!message.sender) return;
if (!('bot' in message.sender) || !message.sender.bot) return;
const pair = this.instance.forwardPairs.find(message.chat);
if (!pair) return;
Expand Down

0 comments on commit c7368c5

Please sign in to comment.