Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

broken with external users outside the company #6

Open
neotea opened this issue Jul 12, 2023 · 0 comments
Open

broken with external users outside the company #6

neotea opened this issue Jul 12, 2023 · 0 comments

Comments

@neotea
Copy link

neotea commented Jul 12, 2023

I was looking for a solution to export my own chat, since I used it as a notebook and bookmark.
Unfortunately I got the error:
DEBUG:urllib3.connectionpool:https://slack.com:443 "POST /api/conversations.list HTTP/1.1" 200 2276 Data retrieved OK. Status code: 200 Traceback (most recent call last): File "/slack-dm/slack.py", line 214, in <module> convers, options = fetch_conversations() File "/slack-dm/slack.py", line 112, in fetch_conversations 'user_name': users[conver['user']]['name'] KeyError: 'U01EXNX1234'

I have checked and the sepcific user seems to be an external user in my workspace
!!!conver={'id': 'D047Y5R1234', 'created': 1666715881, 'is_archived': False, 'is_im': True, 'is_org_shared': False, 'context_team_id': 'TD46B1234', 'updated': 1666715881, 'is_shared': True, 'is_ext_shared': True, 'user': 'U01EXNX1234', 'is_user_deleted': False, 'priority': 0}
Different to the other users, it has 'is_shared': True, 'is_ext_shared': True, Keys.
So for me I have fixed the problem by changing line 108 from
if conver['is_im']:
to
if conver['is_im'] and conver.get("is_shared") is None:

that workaround worked for me since I only wanted to grab my own conversation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant