FEATURE: Let users delete their own topics. (#7267)

This commit is contained in:
Bianca Nenciu
2019-03-29 18:10:05 +02:00
committed by Régis Hanol
parent 4a3daacb1b
commit 31053f30de
8 changed files with 31 additions and 10 deletions

View File

@@ -167,8 +167,9 @@ class PostDestroyer
I18n.with_locale(SiteSetting.default_locale) do
# don't call revise from within transaction, high risk of deadlock
key = @post.is_first_post? ? 'js.topic.deleted_by_author' : 'js.post.deleted_by_author'
@post.revise(@user,
{ raw: I18n.t('js.post.deleted_by_author', count: delete_removed_posts_after) },
{ raw: I18n.t(key, count: delete_removed_posts_after) },
force_new_version: true
)