Skip to content

Commit

Permalink
Add threshold to automatically delete toots
Browse files Browse the repository at this point in the history
  • Loading branch information
atsu1125 committed Nov 11, 2022
1 parent ecbc132 commit cad5552
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/account_statuses_cleanup_policy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ class AccountStatusesCleanupPolicy < ApplicationRecord
include Redisable

ALLOWED_MIN_STATUS_AGE = [
12.hours.seconds,
1.day.seconds,
3.day.seconds,
1.week.seconds,
2.weeks.seconds,
1.month.seconds,
Expand Down
3 changes: 3 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1407,12 +1407,15 @@ en:
min_age:
'1209600': 2 weeks
'15778476': 6 months
'259200': 3 days
'2629746': 1 month
'31556952': 1 year
'43200': 12 hours
'5259492': 2 months
'604800': 1 week
'63113904': 2 years
'7889238': 3 months
'86400': 1 day
min_age_label: Age threshold
min_favs: Keep posts favourited at least
min_favs_hint: Doesn't delete any of your posts that has received at least this amount of favourites. Leave blank to delete posts regardless of their number of favourites
Expand Down
4 changes: 4 additions & 0 deletions config/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1369,11 +1369,15 @@ ja:
min_age:
'1209600': 2週間
'15778476': 6ヶ月
'259200': 3日
'2629746': 1ヶ月
'31556952': 1年
'43200': 12時間
'5259492': 2ヶ月
'604800': 1週間
'63113904': 2年
'7889238': 3ヶ月
'86400': 1日
min_age_label: 投稿を保持する期間
min_favs: これ以上お気に入りに登録された投稿を無視する
min_favs_hint: この数以上、お気に入りに登録された投稿を削除しません。空白にしておくと、お気に入りに登録された数に関わらず投稿を削除します。
Expand Down

0 comments on commit cad5552

Please sign in to comment.