Allow Discord to get thread/post previews of our private Discourse forum

This one’s a little odd, and I can’t find anything that talks about it, so asking the question here.

We’ve a private, invite-only Discourse forum. We also have a private, invite-only Discord server. The two go great together! But one thing would make it better: when someone posts a link to Discourse forum in Discord chat, it’d be awesome to allow Discord to “see” the thread or post and provide a real preview of it, instead of a preview of the “this is our private Discourse forum” page you see when logged out.

Anyone tried this? Feels like it would be rather hacky to implement, but I’m curious all the same. Thanks!

I don’t think this is possible for basic link previews as Discord can only see public pages.

You could sync messages via API though.

2 Likes

Yep, I have a bit of that set up, which works great when someone posts to Discourse (it crossposts to Discord).

Was wondering if I could make a carveout in the permissions, but would also make sense that’s just not possible w/ the way Discourse self-hosted (Docker container) works.

Nothing to do with Docker per se.

It’s all app permissions.

Crawlers can’t see private posts just as anon can’t.

Discord is essentially crawling your site and oops, can’t see your post to provide a preview.

You might be able to build a bot to do this but that’s marketplace material.

2 Likes

Yup didn’t mention Docker other than to contextualize our setup. Mostly was wondering if I could set up a “if you have this header/API key/whatever” rule to allow access.

1 Like

I don’t see how Discord would know to do that.

But if you have a bot already doing a sync, consider expanding that to render Discord embeds?

Less about what Discord knows, and more about Discourse having a carveout or allow rule of some kind to permit Discord (e.g., allow these IP addresses).

But you offer a much better suggestion: make the existing Discord bot better!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.