# 一个设置用于控制只发送聊天推送通知的默认行为会非常有帮助

**URL:** <https://meta.discourse.org/t/a-site-setting-to-control-default-behaviour-of-only-send-chat-push-notifications-would-be-very-helpful/286315>\
**Category:** Feature\
**Tags:** chat\
**Created:** [2023 年11 月 22 日 11:43 UTC](https://meta.discourse.org/t/a-site-setting-to-control-default-behaviour-of-only-send-chat-push-notifications-would-be-very-helpful/286315 "2023-11-22T11:43:27Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![nathank](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nathank/32/290039_2.png) [@nathank](https://meta.discourse.org/u/nathank)\
发布日期： [2023 年11 月 22 日 11:43 UTC](https://meta.discourse.org/t/a-site-setting-to-control-default-behaviour-of-only-send-chat-push-notifications-would-be-very-helpful/286315/1 "2023-11-22T11:43:27Z")

</div>

这由用户设置 ☑ `only_send_chat_push_notifications` 控制，可在 [/my/preferences/chat](https://meta.discourse.org/my/preferences/chat) 中找到：

> ![image](https://global.discourse-cdn.com/meta/original/4X/5/8/c/58c90a25a29d103316c49f13f3ca665c35c3d63e.png)

没有站点设置可以控制默认行为。

首先，这个设置相当隐蔽，可能最好也放在 [/my/preferences/notifications](https://meta.discourse.org/my/preferences/notifications) 中，我自然会去那里查找。另外，我希望能够为我的实例将此设置为默认的 `TRUE`，这样我的用户就只会收到设备上的聊天通知（除非他们想要更多）。

关键问题是，大多数 Discourse 通知并不紧急；它们的异步性是我 ❤ Discourse 的最强原因之一！将它们作为推送通知只是令人烦恼，因为我收到的太多了，它们根本不值得打断我的注意力。它们可以等到我访问站点（或阅读摘要）时再处理。

然而，聊天是短暂的，并且更加同步。因此，允许聊天拥有推送通知，并抑制其他所有通知，这对我来说是有意义的。我自己可以轻易做到这一点，但要设置默认行为或让不太懂技术的用户轻松做到这一点非常困难。

### 解决方法

我认为可以通过在加入向导中使用自定义的 `Update Profile` 操作（[https://meta.discourse.org/t/custom-wizard-plugin/73345）来解决这个问题（必须弄清楚如何做到！）。](https://meta.discourse.org/t/custom-wizard-plugin/73345%EF%BC%89%E6%9D%A5%E8%A7%A3%E5%86%B3%E8%BF%99%E4%B8%AA%E9%97%AE%E9%A2%98%EF%BC%88%E5%BF%85%E9%A1%BB%E5%BC%84%E6%B8%85%E6%A5%9A%E5%A6%82%E4%BD%95%E5%81%9A%E5%88%B0%EF%BC%81%EF%BC%89%E3%80%82)

---

_[View the full topic](https://meta.discourse.org/t/a-site-setting-to-control-default-behaviour-of-only-send-chat-push-notifications-would-be-very-helpful/286315)._
