# 邀请按钮行为异常

**URL:** https://meta.discourse.org/t/weird-invite-button-behavior/401819
**Category:** UX
**Tags:** invites
**Created:** [2026年四月29日 15:46 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819 "2026-04-29T15:46:01Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)
#### Post date: [2026年四月29日 15:46 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/1 "2026-04-29T15:46:01Z")

</div>

在别人的个人资料页上，你只会看到其中一个按钮（当没有邀请时）

 ![image](https://global.discourse-cdn.com/meta/original/4X/f/5/d/f5dae5edc09d013eee52a4a164dfb9e0808fa660.png)

或者另一个按钮（如果有邀请时）

 ![image](https://global.discourse-cdn.com/meta/original/4X/b/2/2/b223ded824450cd1582b7b2e8c6e06d1e93ee143.png)

这两个按钮都会为你自己的用户创建邀请。

预期行为：你只应在自己的个人资料页上看到创建邀请的按钮。

---

<div class="post-metadata">

### Author: ![putty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/putty/32/370902_2.png) [@putty](https://meta.discourse.org/u/putty)
#### Post date: [2026年四月29日 16:09 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/2 "2026-04-29T16:09:29Z")

</div>

> [@RGJ](#):
>
> 预期：您只应在_自己的个人资料_中看到创建邀请的按钮

顺便一提，我认为能够代表他人创建邀请具有价值。我就是这样为我们的客户成功代表操作的，他们不熟悉 Discourse，但希望邀请他们的客户加入社区。

---

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2026年四月29日 16:40 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/3 "2026-04-29T16:40:51Z")

</div>

> [@putty](#):
>
> 顺便提一下，我认为能够代表他人创建邀请是有价值的。

是的，但功能并非如此运作。邀请是从发送者的账户发出的，而不是从用户个人资料发出的。这与你从自己的个人资料发送邀请没有区别。

> [@RGJ](#):
>
> 两个按钮都会为你自己的用户创建邀请。

当被邀请者收到邀请时，邀请来自在个人资料上点击按钮的人，而不是该个人资料的用户。该个人资料的用户甚至不知道有邀请，所以这并非真正代表他们（他们不会收到通知或任何相关信息）。

从用户体验的角度来看，在其他成员的个人资料上放置一个邀请按钮，而这些按钮实际上与这些用户毫无关系，这让我觉得有些奇怪。

---

<div class="post-metadata">

### Author: ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)
#### Post date: [2026年四月29日 19:06 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/4 "2026-04-29T19:06:35Z")

</div>

> [@Lilly](#):
>
> 从用户体验的角度来看，在其他成员的个人页面上显示邀请按钮确实让我感到奇怪，因为这些按钮与那些用户实际上毫无关系。

完全同意！这一点一直让我很困扰，但之前还没到要发帖讨论的程度——所以非常感谢 @RGJ 把它清晰地表达了出来。

---

<div class="post-metadata">

### Author: ![awesomerobot](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/awesomerobot/32/142900_2.png) [@awesomerobot](https://meta.discourse.org/u/awesomerobot)
#### Post date: [2026年五月5日 15:29 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/5 "2026-05-05T15:29:25Z")

</div>

是的，这个应该被隐藏。代表他人创建邀请是一个合理的功能请求，但正如提到的，我们尚未实现该功能。

我正在着手修复，以隐藏该按钮

> <https://github.com/discourse/discourse/pull/39753>
>
> Issue with hidden profiles: https://meta.discourse.org/t/invite-tab-shows-on-hid…den-profile/401818
> 
> Issue with invite button visible on others' profiles: https://meta.discourse.org/t/weird-invite-button-behavior/401819
> 
> 1. Checks if the user's profile is hidden in \`canInviteToForum\` so the tab no longer appears on hidden profiles. 
> 
> 2. Adds check for \`viewingSelf\` to hide the invite buttons on other profiles 
> 
> 3. Adds tests to avoid regressing 
> 
> 
> 
> Before:
> \<img width="2232" height="424" alt="image" src="https://github.com/user-attachments/assets/3d884e5f-46b8-4599-a6d2-8dfc77fd531e" /\>
> 
> 
> After: 
> \<img width="2194" height="450" alt="image" src="https://github.com/user-attachments/assets/1bbd1a11-1558-4800-b3ba-a3d16fc8564f" /\>
> 
> 
> Before:
> \<img width="2234" height="650" alt="image" src="https://github.com/user-attachments/assets/e4e5e65f-007d-4b7d-9c70-b2a32162f557" /\>
> 
> 
> After:
> \<img width="2242" height="530" alt="image" src="https://github.com/user-attachments/assets/40c19cf7-6702-4598-8bd4-04f4896c0586" /\>

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [2026年五月21日 13:59 UTC](https://meta.discourse.org/t/weird-invite-button-behavior/401819/6 "2026-05-21T13:59:34Z")

</div>


