# 论坛顶部的更新通知

**URL:** <https://meta.discourse.org/t/update-notice-at-the-top-of-the-forum/407111>\
**Category:** Self-hosting\
**Created:** [2026年七月8日 21:42 UTC](https://meta.discourse.org/t/update-notice-at-the-top-of-the-forum/407111 "2026-07-08T21:42:28Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)\
**Post date:** [2026年七月8日 21:54 UTC](https://meta.discourse.org/t/update-notice-at-the-top-of-the-forum/407111/2 "2026-07-08T21:54:56Z")

</div>

是这个吗？（我觉得这段文字和这个例子中的有点不一样）

> [@awesomerobot](#):
>
> ![Screen Shot 2021-03-02 at 12.08.46 PM](https://global.discourse-cdn.com/meta/original/3X/6/1/61eeb95db6fb821a5aad563d78a0703cb6f6df07.png)

这是 Discourse 核心的一部分

> <https://github.com/discourse/discourse/pull/12577>
>
> !\[image\](https://user-images.githubusercontent.com/920448/113239454-1ceb8180-92e…e-11eb-82db-82a3200a7cc7.png)
> !\[image\](https://user-images.githubusercontent.com/920448/113248069-963fa000-92ff-11eb-819a-7cbda9c41c38.png)
> 
> This moves the "This site was just updated" modal asking the user if they want to refresh into a subtle prompt that slides down from the header.
> 
> Also in this PR I've added a helper to publish message bus messages in JS tests. So instead of this:
> 
> \`\`\`javascript
> // Mimic a messagebus message
> MessageBus.callbacks
> .filterBy("channel", "/global/asset-version")
> .map((c) =\> c.func("somenewversion"));
> \`\`\`
> 
> We can have:
> 
> \`\`\`javascript
> publishToMessageBus("/global/asset-version", "somenewversion");
> \`\`\`
> 
> \### Testing
> 
> Change this JS:
> 
> \`\`\`
> timeout = later(() =\> {
> updatePromptWidget.state.showPrompt = true;
> updatePromptWidget.scheduleRerender();
> }, 1000 \* 60 \* 24 \* 60);
> \`\`\`
> 
> to
> 
> \`\`\`
> timeout = later(() =\> {
> updatePromptWidget.state.showPrompt = true;
> updatePromptWidget.scheduleRerender();
> }, 500);
> \`\`\`
> 
> And send messagebus messages via \`rails c\` like so (the numbers are just random):
> 
> \`\`\`ruby
> MessageBus.publish("/global/asset-version", 428523235235)
> \`\`\`

---

_[View the full topic](https://meta.discourse.org/t/update-notice-at-the-top-of-the-forum/407111)._
