Skip to content

Commit

Permalink
Fix "unknown command" not showing up on private chats (fixes #25)
Browse files Browse the repository at this point in the history
This was a regression of 850d6e9.
  • Loading branch information
Pietro Albini committed Feb 20, 2016
1 parent eff892a commit a084638
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions botogram/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"""

from . import utils
from . import objects
from . import components
from . import decorators

Expand Down Expand Up @@ -142,7 +141,7 @@ def no_commands_hook(self, bot, chat, message):
username = bot.itself.username

mentioned = splitted[0] == "/%s@%s" % (command, username)
single_user = isinstance(chat, objects.User)
single_user = chat.type == "private"
if mentioned or single_user:
chat.send("\n".join([
bot._("Unknown command: /%(name)s", name=command),
Expand Down

0 comments on commit a084638

Please sign in to comment.