flock: Rename local var to to recipient_id in get_flock_response().

This commit is contained in:
novokrest 2018-06-08 21:45:33 +03:00 committed by showell
parent a17bd77b71
commit 5c46a4e68e

View file

@ -45,15 +45,15 @@ right now.\nPlease try again later"
def get_flock_response(content: str, config: Dict[str, str]) -> str: def get_flock_response(content: str, config: Dict[str, str]) -> str:
token = config['token'] token = config['token']
content_pieces = content.split(':') content_pieces = content.split(':')
to = content_pieces[0].strip() recipient_name = content_pieces[0].strip()
message = content_pieces[1].strip() message = content_pieces[1].strip()
to = get_recipient_id(content, config) recipient_id = get_recipient_id(content, config)
if len(str(to)) > 30: if len(str(recipient_id)) > 30:
return to return recipient_id
payload = { payload = {
'to': to, 'to': recipient_id,
'text': message, 'text': message,
'token': token 'token': token
} }