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

Drop support for @person in favour of <@userid> #33

Closed
nzlosh opened this issue Jun 25, 2021 · 2 comments · Fixed by #31
Closed

Drop support for @person in favour of <@userid> #33

nzlosh opened this issue Jun 25, 2021 · 2 comments · Fixed by #31

Comments

@nzlosh
Copy link
Collaborator

nzlosh commented Jun 25, 2021

Slack changed how to uniquely identify users from the display name to user id. The #31 unittests branch includes a change which alters how user information in the Person class is reported and used.

To illustrate the change here is the whois output from the original slack backend:

┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ key      ┃ value                ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ person   │ `@nzlosh`            │
├──────────┼──────────────────────┤
│ nick     │ `nzlosh`             │
├──────────┼──────────────────────┤
│ fullname │ `Carlos`             │
├──────────┼──────────────────────┤
│ client   │ `DSKNFHVT5`          │
├──────────┼──────────────────────┤
│ email    │ `nzlosh@yahoo.com`   │
└──────────┴──────────────────────┘

The slackv3 unittests branch reports the following for whois

┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┓
┃ key      ┃ value              ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━┩
│ person   │ `UMV1SEYMA`        │
├──────────┼────────────────────┤
│ nick     │ `nzlosh`           │
├──────────┼────────────────────┤
│ fullname │ `Carlos`           │
├──────────┼────────────────────┤
│ client   │ `D018GUWHXN0`      │
├──────────┼────────────────────┤
│ email    │ ``                 │
└──────────┴────────────────────┘

The major difference is the person field shifts from @username to userid. User id's are meant to be wrapped in the form <@Uxxxxx> when highlighting a specific user. This change in the backend would impact existing plugins that depend on the @username behaviour that has been deprecated since 2017. For more information about this change see https://api.slack.com/changelog/2017-09-the-one-about-usernames

@nzlosh nzlosh linked a pull request Oct 17, 2021 that will close this issue
@jcfrt
Copy link
Contributor

jcfrt commented Aug 29, 2022

I have no idea what I'm talking about and I'm very tired after investigating for hours, but it seems to me that this "person" field being now a UUID broke some things, like the config file regarding who is admin of the bot they can't be matched by name anymore), and I get errors from errbot saying errbot.backends.base.UserDoesNotExistError: Cannot find user 'UUID_HERE whenever something involving a user is triggered.

Any idea if this is an errbot problem, a slack_sdk problem, or a backend-slackv3 problem?

@jcfrt
Copy link
Contributor

jcfrt commented Aug 29, 2022

Nevermind, I spoke too soon. There doesn't seem to be an issue. I cleared my cached data and the error doesn't seem to occur anymore.
I also fixed my admin issue: I erroneously added the UUID as "@uxxx" instead of simply "Uxxx".
It's still a bit annoying that logs display UUIDs now instead of usernames, but I guess this can be solved on errbot's side.

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

Successfully merging a pull request may close this issue.

2 participants