FEATURE: automatically delete replies on a topic after N days. (#9209)
This commit is contained in:
@@ -4,7 +4,14 @@ import RestModel from "discourse/models/rest";
|
||||
const TopicTimer = RestModel.extend({});
|
||||
|
||||
TopicTimer.reopenClass({
|
||||
updateStatus(topicId, time, basedOnLastPost, statusType, categoryId) {
|
||||
updateStatus(
|
||||
topicId,
|
||||
time,
|
||||
basedOnLastPost,
|
||||
statusType,
|
||||
categoryId,
|
||||
duration
|
||||
) {
|
||||
let data = {
|
||||
time,
|
||||
status_type: statusType
|
||||
@@ -12,6 +19,7 @@ TopicTimer.reopenClass({
|
||||
|
||||
if (basedOnLastPost) data.based_on_last_post = basedOnLastPost;
|
||||
if (categoryId) data.category_id = categoryId;
|
||||
if (duration) data.duration = duration;
|
||||
|
||||
return ajax({
|
||||
url: `/t/${topicId}/timer`,
|
||||
|
||||
Reference in New Issue
Block a user