From 5c46a4e68e64c86d17e4e763918a6ce6128c2487 Mon Sep 17 00:00:00 2001 From: novokrest Date: Fri, 8 Jun 2018 21:45:33 +0300 Subject: [PATCH] flock: Rename local var `to` to `recipient_id` in `get_flock_response()`. --- zulip_bots/zulip_bots/bots/flock/flock.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zulip_bots/zulip_bots/bots/flock/flock.py b/zulip_bots/zulip_bots/bots/flock/flock.py index 1faa13c..ca47f30 100644 --- a/zulip_bots/zulip_bots/bots/flock/flock.py +++ b/zulip_bots/zulip_bots/bots/flock/flock.py @@ -45,15 +45,15 @@ right now.\nPlease try again later" def get_flock_response(content: str, config: Dict[str, str]) -> str: token = config['token'] content_pieces = content.split(':') - to = content_pieces[0].strip() + recipient_name = content_pieces[0].strip() message = content_pieces[1].strip() - to = get_recipient_id(content, config) - if len(str(to)) > 30: - return to + recipient_id = get_recipient_id(content, config) + if len(str(recipient_id)) > 30: + return recipient_id payload = { - 'to': to, + 'to': recipient_id, 'text': message, 'token': token }