{"action":"created","issue":{"url":"https://api.github.com/repos/42wim/matterbridge/issues/510","repository_url":"https://api.github.com/repos/42wim/matterbridge","labels_url":"https://api.github.com/repos/42wim/matterbridge/issues/510/labels{/name}","comments_url":"https://api.github.com/repos/42wim/matterbridge/issues/510/comments","events_url":"https://api.github.com/repos/42wim/matterbridge/issues/510/events","html_url":"https://github.com/42wim/matterbridge/issues/510","id":367581246,"node_id":"MDU6SXNzdWUzNjc1ODEyNDY=","number":510,"title":"Move to use Slack's new APIs and tokens?","user":{"login":"Helcaraxan","id":896592,"node_id":"MDQ6VXNlcjg5NjU5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/896592?v=4","gravatar_id":"","url":"https://api.github.com/users/Helcaraxan","html_url":"https://github.com/Helcaraxan","followers_url":"https://api.github.com/users/Helcaraxan/followers","following_url":"https://api.github.com/users/Helcaraxan/following{/other_user}","gists_url":"https://api.github.com/users/Helcaraxan/gists{/gist_id}","starred_url":"https://api.github.com/users/Helcaraxan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helcaraxan/subscriptions","organizations_url":"https://api.github.com/users/Helcaraxan/orgs","repos_url":"https://api.github.com/users/Helcaraxan/repos","events_url":"https://api.github.com/users/Helcaraxan/events{/privacy}","received_events_url":"https://api.github.com/users/Helcaraxan/received_events","type":"User","site_admin":false},"labels":[{"id":277015431,"node_id":"MDU6TGFiZWwyNzcwMTU0MzE=","url":"https://api.github.com/repos/42wim/matterbridge/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"closed","locked":false,"assignee":{"login":"Helcaraxan","id":896592,"node_id":"MDQ6VXNlcjg5NjU5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/896592?v=4","gravatar_id":"","url":"https://api.github.com/users/Helcaraxan","html_url":"https://github.com/Helcaraxan","followers_url":"https://api.github.com/users/Helcaraxan/followers","following_url":"https://api.github.com/users/Helcaraxan/following{/other_user}","gists_url":"https://api.github.com/users/Helcaraxan/gists{/gist_id}","starred_url":"https://api.github.com/users/Helcaraxan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helcaraxan/subscriptions","organizations_url":"https://api.github.com/users/Helcaraxan/orgs","repos_url":"https://api.github.com/users/Helcaraxan/repos","events_url":"https://api.github.com/users/Helcaraxan/events{/privacy}","received_events_url":"https://api.github.com/users/Helcaraxan/received_events","type":"User","site_admin":false},"assignees":[{"login":"Helcaraxan","id":896592,"node_id":"MDQ6VXNlcjg5NjU5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/896592?v=4","gravatar_id":"","url":"https://api.github.com/users/Helcaraxan","html_url":"https://github.com/Helcaraxan","followers_url":"https://api.github.com/users/Helcaraxan/followers","following_url":"https://api.github.com/users/Helcaraxan/following{/other_user}","gists_url":"https://api.github.com/users/Helcaraxan/gists{/gist_id}","starred_url":"https://api.github.com/users/Helcaraxan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helcaraxan/subscriptions","organizations_url":"https://api.github.com/users/Helcaraxan/orgs","repos_url":"https://api.github.com/users/Helcaraxan/repos","events_url":"https://api.github.com/users/Helcaraxan/events{/privacy}","received_events_url":"https://api.github.com/users/Helcaraxan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2018-10-07T18:39:49Z","updated_at":"2018-11-13T20:38:34Z","closed_at":"2018-11-13T19:53:39Z","author_association":"COLLABORATOR","body":"# Context & problem\r\nSomewhat. Almost filed this as a \"bug\" rather than an FR but thought that as it is not a blocker issue I'd go this way to open up the discussion. I have been in the process of setting up some bridging between, mostly, Discord & Slack. Matterbridge is great for this (love, kudos and many thanks to this great repo and its contributors!).\r\n\r\nThe Discord-side has been entirely painless, up and running within minutes (if not seconds). However the Slack-side has been (and still is) a painful experience. Everything worked fine on my own test-Slack workspace but when migrating to an Enterprise Slack things got a little bit spicier. The obvious failure in the room was the continuous inability for Matterbridge to forward incoming Discord messages with the error `channel_not_found`.\r\n\r\n# Solution\r\nDebugging brought me into the depths of the Slack API and the `nlopes/slack` (which are both old friends o' mine). Long story short, Matterbridge relies (if one follows the documentation) on Slack legacy tokens. There have however been significant changes with regards to how Slack deals with Apps and their bots and it is nowadays perfectly possible to use non-legacy tokens. Another, separate, change has been their [\"Conversations API\"](https://api.slack.com/docs/conversations-api) which aims at simplifying the management of all things chat.\r\n\r\nThe easiest, albeit not necessarily best, solution would be to switch entirely to using the new Apps+bot approach and rewrite the code in `bridge/slack/slack.go` accordingly. This would remove the possibility to use legacy tokens. A clean-up of the semantics of the Slack-section in the configuration file could be done at the same time.\r\n\r\n# Alternatives\r\nIf the removal of legacy tokens is considered to be too much of burden and there is a preference for a more gradual migration there is an alternative:\r\n\r\nMaintaining the status quo that is adapted to legacy token and write separate new code-paths for the Apps+bots path. These paths could be auto-chosen based on the specified token value (as the new bot-tokens all start with `xoxb-`, unlike the legacy tokens).\r\n\r\n# Further notes\r\nI'd be happy to write the code for this. I'll be writing a variant of it anyway given that I will need to use the new Apps+bot approach myself. However thought I'd ask for input here first to decide which of both ways would be preferred when the time comes for a PR."},"comment":{"url":"https://api.github.com/repos/42wim/matterbridge/issues/comments/438428004","html_url":"https://github.com/42wim/matterbridge/issues/510#issuecomment-438428004","issue_url":"https://api.github.com/repos/42wim/matterbridge/issues/510","id":438428004,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODQyODAwNA==","user":{"login":"Helcaraxan","id":896592,"node_id":"MDQ6VXNlcjg5NjU5Mg==","avatar_url":"https://avatars0.githubusercontent.com/u/896592?v=4","gravatar_id":"","url":"https://api.github.com/users/Helcaraxan","html_url":"https://github.com/Helcaraxan","followers_url":"https://api.github.com/users/Helcaraxan/followers","following_url":"https://api.github.com/users/Helcaraxan/following{/other_user}","gists_url":"https://api.github.com/users/Helcaraxan/gists{/gist_id}","starred_url":"https://api.github.com/users/Helcaraxan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Helcaraxan/subscriptions","organizations_url":"https://api.github.com/users/Helcaraxan/orgs","repos_url":"https://api.github.com/users/Helcaraxan/repos","events_url":"https://api.github.com/users/Helcaraxan/events{/privacy}","received_events_url":"https://api.github.com/users/Helcaraxan/received_events","type":"User","site_admin":false},"created_at":"2018-11-13T20:38:34Z","updated_at":"2018-11-13T20:38:34Z","author_association":"COLLABORATOR","body":"I will be doing that tonight or, more likely, tomorrow morning."}}
{"actor":{"display_login":"Helcaraxan"}}