用户达到新的信任等级时自动发送私信

你好,

我们有一个 Discourse 论坛和一个 Slack 频道,我们希望在用户达到信任等级 2 时邀请他们加入 Slack。

我希望能够在某人达到信任等级 2 时自动发送一条私信,其中包含 Slack 的邀请链接。请问如何在 Discourse 中配置此功能?

此致,
Dylan

1 个赞

You could easily create a Trust Level 2 - see permission category with the invite and sign up info as a Pinned topic.

2 个赞

I’m aware, but to me, that lacks personality and I’d love to thank them automatically for being an active member and invite them to the slack chat

There’s no built-in way to do this, but it shouldn’t be hard to make a plugin for this. You can post in our marketplace if it can’t be created internally.

2 个赞

We have discussed sending an automatic “congrats!” PM at trust level 2 and 3, also inviting users to try the advanced discobot tutorial as well @erlend_sh

1 个赞

@codinghorror That be great. For now, is there any way to retrieve a user’s trust level through JS so that we could assign a css class to the <html> tag and show a banner message or button once they reached a certain level?

1 个赞

It should be doable as a plugin if it doesn’t happen in Core. I think you could assign any currentUser property to any tag’s attribute. This is old, crude and not recently tested, but it might help as a start

3 个赞

现在信任等级 1 已实现此功能 — FEATURE: send message when a user reaches tl1 · discourse/discourse@41f76a7 · GitHub

编辑:信任等级 2 也已实现该功能相当长一段时间了,而针对 TL3 的祝贺(“欢迎来到休息室”)也已实施了一段时间。

6 个赞

我该如何编辑这些消息?它们很棒,但我们希望它们与我们的 TOV(语气和风格)保持一致。谢谢。

3 个赞