mirror of
https://github.com/discourse/discourse.git
synced 2025-05-29 01:31:35 +08:00
FEATURE: Basic backend support for muted and watched categories
This commit is contained in:
@ -22,17 +22,23 @@ class TopicCreator
|
||||
save_topic
|
||||
|
||||
watch_topic
|
||||
auto_mute_topic
|
||||
|
||||
@topic
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def auto_mute_topic
|
||||
CategoryUser.auto_mute_new_topic(@topic)
|
||||
end
|
||||
|
||||
def watch_topic
|
||||
unless @opts[:auto_track] == false
|
||||
@topic.notifier.watch_topic!(@topic.user_id)
|
||||
end
|
||||
TopicUser.auto_watch_new_topic(@topic.id)
|
||||
CategoryUser.auto_watch_new_topic(@topic)
|
||||
end
|
||||
|
||||
def setup
|
||||
|
Reference in New Issue
Block a user