diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2021-08-10 04:19:54 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2021-08-10 04:19:54 -0700 |
commit | 4fd5514a5930fcdebfd6367efb4839ff420b5ca7 (patch) | |
tree | 3eb98a7c278715d419f360155c415f9babd43508 /browse_slack | |
parent | 33b77b31b420df8dba66f2f0a7efed8aeeae7f06 (diff) | |
download | mu-4fd5514a5930fcdebfd6367efb4839ff420b5ca7.tar.gz |
.
Diffstat (limited to 'browse_slack')
-rw-r--r-- | browse_slack/convert_slack.py | 11 |
1 files changed, 5 insertions, 6 deletions
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 = [] |