sentrydiscord.dev icon indicating copy to clipboard operation
sentrydiscord.dev copied to clipboard

Add basic support for threads

Open GeniusTimo opened this issue 2 years ago • 5 comments

Hey there 👋

This pull request is quite incomplete, but I wanted to leave this as a suggestion to provide support for sending webhook messages within threads. Perhaps my solution is as simple as suggested but I have not tested this yet - in addition, it lacks any documentation.

Hopefully I'm not the only one looking for a thread-only webhook ✌

GeniusTimo avatar Aug 21 '22 21:08 GeniusTimo

@GeniusTimo is attempting to deploy a commit to the Sentry Discord Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Aug 21 '22 21:08 vercel[bot]

Oh interesting. I actually don't know how threads and webhooks work within Discord - is it a webhook on a channel with just the thread_id param passed in?

IanMitchell avatar Aug 22 '22 16:08 IanMitchell

Yes! https://discord.dev/resources/webhook#execute-webhook

GeniusTimo avatar Aug 22 '22 16:08 GeniusTimo

Sweet! I will try to take a look at this sometime this week, but I might be a little too busy to get to it - I'm heading out on an international trip for a week, so this might sit until the second week of September, sorry :(

IanMitchell avatar Aug 23 '22 19:08 IanMitchell

No problem, have a nice vacation ✈

GeniusTimo avatar Aug 23 '22 20:08 GeniusTimo

Any chance this could be merged? From my experience with the Discord API, the PR looks good to me.

I can play around with extending the functionality later - it'd be useful to create a new thread based on the Sentry issue and add subsequent messages to the same thread. With this current PR everything would just be in a single thread. It'll take some querying of the Discord channel but it should be doable.

connorjclark avatar Jul 01 '23 04:07 connorjclark

Yeah! Lemme do a little bit of testing on it and I will get it in sometime this week. Probably gonna need to get to the other side of July 4th first, but after that I'll try and get it out quickly. Sorry, I guess I lost track of this PR - thank you for the reminder bump

IanMitchell avatar Jul 03 '23 16:07 IanMitchell

Merged into Main, should be deployed soon!

IanMitchell avatar Jul 05 '23 19:07 IanMitchell

Thank you!

GeniusTimo avatar Jul 05 '23 19:07 GeniusTimo