Skip to content

Commit 84d7141

Browse files
authored
Quick fix for duplicate footer after chat migration (jsmnbom#20)
1 parent 6b237f8 commit 84d7141

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bot/github.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,12 @@ def _send(self, repo, text, check_repo: Callable[[Repo], bool], suffix=REPLY_MES
6464
if check_repo(repo):
6565
truncation_limit = chat_data.get('truncation_limit', DEFAULT_TRUNCATION_LIMIT)
6666
try:
67-
text = truncated_text[truncation_limit]
67+
message_text = truncated_text[truncation_limit]
6868
except KeyError:
69-
text = truncate(text, TRUNCATED_MESSAGE, suffix, max_length=truncation_limit)
69+
message_text = truncate(text, TRUNCATED_MESSAGE, suffix, max_length=truncation_limit)
7070

7171
try:
72-
self.dispatcher.bot.send_message(chat_id=chat_id, text=text,
72+
self.dispatcher.bot.send_message(chat_id=chat_id, text=message_text,
7373
parse_mode=ParseMode.HTML, disable_web_page_preview=True)
7474
except TelegramError:
7575
logging.error('error while sending github update', exc_info=1)

0 commit comments

Comments
 (0)