mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-03 00:20:04 +08:00
When the `set_topic_timer` automation script saves a `:close` or `:silent_close` timer on a topic that is already closed, `TopicTimer#after_save` treats that state mismatch as the "Open Temporarily" UI intent and immediately reopens the topic as the system user. Example seen on meta: an automation configured to add a 3-day close timer whenever the `fixed` tag is present and a bug post is edited was inadvertently reopening already-closed bug topics. Editing such a topic fired the automation, the `:close` timer was saved, and the topic was reopened by `system` before a moderator noticed and re-closed it. Guard `auto_close` and `auto_close_after_last_post` in the script with an early `next` when `topic.closed?` so the automation no-ops on closed topics rather than triggering the reopen side-effect. |
||
|---|---|---|
| .. | ||
| fabricators | ||
| integration | ||
| jobs | ||
| lib | ||
| models | ||
| requests | ||
| scripts | ||
| serializers | ||
| services | ||
| system | ||
| triggers | ||
| plugin_helper.rb | ||