From 4fd5514a5930fcdebfd6367efb4839ff420b5ca7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 10 Aug 2021 04:19:54 -0700 Subject: . --- browse_slack/convert_slack.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'browse_slack') diff --git a/browse_slack/convert_slack.py b/browse_slack/convert_slack.py index ad9e9789..57be3681 100644 --- a/browse_slack/convert_slack.py +++ b/browse_slack/convert_slack.py @@ -45,12 +45,11 @@ user_id = {} # name -> index length = 0 with open('users.json') as f: for user in json.load(f): - if user['id'] not in user_id: - if 'real_name' not in user: - user['real_name'] = '' - print(f"({json.dumps(user['id'])} \"@{user['name']}\" {json.dumps(user['real_name'])} [{look_up_ppm_image(user['profile']['image_72']) or ''}])") - user_id[user['id']] = length - length += 1 + if 'real_name' not in user: + user['real_name'] = '' + print(f"({json.dumps(user['id'])} \"@{user['name']}\" {json.dumps(user['real_name'])} [{look_up_ppm_image(user['profile']['image_72']) or ''}])") + user_id[user['id']] = length + length += 1 items = [] -- cgit 1.4.1-2-gfad0