aboutsummaryrefslogtreecommitdiffstats
path: root/project/telegramapicommunicator.py
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2016-07-28 15:12:00 -0400
committerJan Tuomi <jans.tuomi@gmail.com>2016-07-28 15:12:00 -0400
commitbc99e19c4ccb7748cf010bd2318bb8a8941ec2ba (patch)
treeb601cc5203f9de4cd6afc0906a165e6f25d6903d /project/telegramapicommunicator.py
parenta4ef3b69b530f1d3e52efda921bbc840319e9e26 (diff)
Fix bug where messages are answered in a wrong Telegram chat
Diffstat (limited to 'project/telegramapicommunicator.py')
-rw-r--r--project/telegramapicommunicator.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/project/telegramapicommunicator.py b/project/telegramapicommunicator.py
index 7fdb29c..a4b6964 100644
--- a/project/telegramapicommunicator.py
+++ b/project/telegramapicommunicator.py
@@ -27,7 +27,10 @@ class TelegramCommunicator(BaseCommunicator):
TelegramCommunicator.send_raw("{}: {}".format(data["user"], data["text"]))
@staticmethod
- def send_raw(message):
+ def send_raw(message, chat_id=None):
+ if chat_id is None:
+ chat_id = TelegramCommunicator.chat_id
+
try:
TelegramCommunicator.bot.sendMessage(TelegramCommunicator.chat_id,
message)