BigOokie / skywire-wing-commander

Wing Commander is a Telegram bot written in GO designed to help the Skyfleet community manage their Skyminers
MIT License
13 stars 5 forks source link

Ignore messages and commands from non-owner (admin) users #10

Closed BigOokie closed 6 years ago

BigOokie commented 6 years ago

Describe the bug A Telegram user who does not own the Wing Commander bot instance can initiate a private chat with the bot based on the bot name, and the bot will respond to commands issued from this user.

Thanks to GoldXT for assistance with identifying this issue.

To Reproduce Steps to reproduce the behavior:

  1. Run your instance of Wing Commander.
  2. Have another Telegram user start a private chat with your bot (based on the bot name)
  3. Have the other user issue one of the commands to the bot.

Expected behavior The bot MUST ignore all messages and commands from Telegram users who are not configured as the Admin (owner) of the bot instance within the config.toml file.