mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FEATURE: adjust autobump system
- We spread out bumping through the day, if you are bumping 4 topics then a topic will be bumped every 6 hours - We add a small, bumping action at the bottom of the post to denote a topic got bumped
This commit is contained in:
@@ -698,10 +698,16 @@ class Topic < ActiveRecord::Base
|
||||
true
|
||||
end
|
||||
|
||||
def add_small_action(user, action_code, who = nil)
|
||||
def add_small_action(user, action_code, who = nil, opts = {})
|
||||
custom_fields = {}
|
||||
custom_fields["action_code_who"] = who if who.present?
|
||||
add_moderator_post(user, nil, post_type: Post.types[:small_action], action_code: action_code, custom_fields: custom_fields)
|
||||
opts = opts.merge(
|
||||
post_type: Post.types[:small_action],
|
||||
action_code: action_code,
|
||||
custom_fields: custom_fields
|
||||
)
|
||||
|
||||
add_moderator_post(user, nil, opts)
|
||||
end
|
||||
|
||||
def add_moderator_post(user, text, opts = nil)
|
||||
|
||||
Reference in New Issue
Block a user