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

Linking Slack threads to Discord threads #1558

Closed
gIsForGravity opened this issue Jul 29, 2021 · 6 comments
Closed

Linking Slack threads to Discord threads #1558

gIsForGravity opened this issue Jul 29, 2021 · 6 comments
Labels
discord enhancement New feature or request slack

Comments

@gIsForGravity
Copy link

Is your feature request related to a problem? Please describe.
Currently, when Slack users reply to a thread, in Discord you just get their message preceded by [thread] (and vice versa with Discord replies), instead of having a Discord thread linked to the Slack thread.

Describe the solution you'd like
When someone sends a message in a Slack thread, or creates a Slack thread, a Discord thread should be created to parallel the Slack one and the messages should be synced. Same with a Discord thread being created or a message being sent in a Discord thread.

Additional context
It's really awesome that Discord finally has a thread feature that can parallel Slack's, and I think this would be such an awesome use for it. Thanks for all the awesome work you guys do.

@gIsForGravity gIsForGravity added the enhancement New feature or request label Jul 29, 2021
@42wim
Copy link
Owner

42wim commented Feb 5, 2022

You need to add PreserveThreading=true to your slack and discord config, it'll map slack thread replies on discord replies.
Discord threads and slack threads are different because the discords ones are ephemeral.

@noisymime
Copy link

@42wim This seems to be working ok for myself (PreserveThreading=true is set for both Slack and Discord) however 1 thing I noticed is that in Discord any replies that come in from Slack are sent from the Bot ID rather than the user as with normal messages. The users name is show on the next line, but you don't get the avatar and it's less clear as their name isn't bolded. Normal (Non-reply) messages work fine.

Not sure if this is expected behaviour or not, but thought I'd call it out.

image

@42wim
Copy link
Owner

42wim commented Feb 5, 2022

Only webhooks can impersonate and we need webhooks and webhooks do not support replies.

discord/discord-api-docs#2410 (comment)

Discord has said multiple times that webhooks replying to messages will never happen. Allowing replies would let webhooks access any message but this behavior only lets them access their own (which they could theoretically access anyway by caching sent messages).

and discord/discord-api-docs#2251

So that's not something matterbridge can fix unfortunately.

@eiclu
Copy link

eiclu commented Mar 29, 2022

@42wim for my group, working Threads is a more important feature than correct usernames on the bot user. Could we get this feature, but only when webhooks are disabled in discord?

@42wim
Copy link
Owner

42wim commented Apr 11, 2022

@LookitheFirst afaik it's just not possible, you can do a workaround by setting PreserveThreading=false

@greenlighttec
Copy link

Hello earlier it was mentioned that threads are ephemeral (and therefore I assume what was meant is that the bridge won't be able to interact with them) however here is documentation from Discord on API v9 https://discord.com/developers/docs/topics/threads that indicates how Bots can interact with threads including receiving message and create events. At the very least we should be able to not lose messages that are occurring within threads. I would like to re-visit the original intent of this feature request, to Discord Threads mimic Slack threads.

I'm thinking some functionality that would be similar to this.
PreserveThreading=True
TreatReplyasThread=False <- added for backwards compatibility, where if this is not set, it'll continue behaving the way it does now

With both above set to true the following behavior should occur.

When a user replies to a message from the bridge in Discord, it responds in slack pre-pending the previous slack messages URL, slack will auto-expand this link and make it visually similar to the way Discord replies behave. If a user creates a thread in Slack or Discord it should create a thread on the other end, Discord should use the first 25 characters of the message as the title of the thread

At a minimum it would be great if we could treat Thread messages in Discord the same way Reply messages are when PreserveThreading is enabled, because right now we're losing those messages entirely.

One day I'll get around to learning Go and would be happy to contribute to this project that has helped a lot in my community :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discord enhancement New feature or request slack
Projects
None yet
Development

No branches or pull requests

5 participants