mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-06 16:31:57 +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. |
||
|---|---|---|
| .. | ||
| add_user_to_group_through_custom_field_spec.rb | ||
| append_last_checked_by_spec.rb | ||
| append_last_edited_by_spec.rb | ||
| auto_responder_spec.rb | ||
| auto_tag_topic_spec.rb | ||
| banner_topic_spec.rb | ||
| close_topic_spec.rb | ||
| email_on_flagged_post_spec.rb | ||
| flag_post_on_words_spec.rb | ||
| gift_exchange_spec.rb | ||
| group_category_notification_default_spec.rb | ||
| pin_topic_spec.rb | ||
| post_spec.rb | ||
| remove_upload_markup_from_deleted_posts_spec.rb | ||
| send_pms_spec.rb | ||
| set_topic_timer_spec.rb | ||
| suspend_user_by_email_spec.rb | ||
| topic_required_words_spec.rb | ||
| topic_spec.rb | ||
| user_global_notice_spec.rb | ||
| user_group_membership_through_badge_spec.rb | ||
| zapier_webhook_spec.rb | ||