aaronpk / Slack-IRC-Gateway

Bridge Slack rooms to IRC channels
Other
34 stars 6 forks source link

Use new Slack naming API #14

Closed gerwitz closed 6 years ago

gerwitz commented 6 years ago

Slack has deprecated the name field being used for connecting user entities, and in any event, it's inconsistent with the UI. (I am @gerwitz on Slack but appear as [hans] in IRC.)

I suggest replacing data.user.name here: https://github.com/aaronpk/Slack-IRC-Gateway/blob/83008d9049e1bd64285aabdbbed61bd48254e88c/gateway.js#L205 with data.user.profile.display_name_normalized but I am not familiar enough to be certain.

See also: https://api.slack.com/changelog/2017-09-the-one-about-usernames

aaronpk commented 6 years ago

Thanks for catching this. It looks like that change will take care of the mapping from when slack users mention other slack names, translating that to the correct name on the IRC side.

The bridge gets the username that is used as the IRC nick from the Slack web hook, I'll need to investigate that to see if that changed as well.

aaronpk commented 6 years ago

Looks like their outgoing web hook api is deprecated, so i'm guessing this user_name field is the old behavior and won't be updated.

The real solution will be to migrate to the RTM API (#8), but that's more than a quick fix.

aaronpk commented 6 years ago

Fixed! https://chat.indieweb.org/meta/2018-02-07#t1518017923193100