flock: Rename local var to to recipient_name in find_recipient method.

This commit is contained in:
novokrest 2018-06-08 22:20:22 +03:00 committed by showell
parent d24e4fc5c8
commit 0a7a06f028

View file

@ -13,9 +13,9 @@ You can send messages to any Flock user associated with your account from Zulip.
# Matches the recipient name provided by user with list of users in his contacts. # Matches the recipient name provided by user with list of users in his contacts.
# If matches, returns the matched User's ID # If matches, returns the matched User's ID
def find_recipient(res: str, to: str) -> str: def find_recipient(res: str, recipient_name: str) -> str:
for obj in res: for obj in res:
if to == obj['firstName']: if recipient_name == obj['firstName']:
return obj['id'] return obj['id']
# Returns User's ID, if not found, returns error message. # Returns User's ID, if not found, returns error message.