Fix: #404 フィルターでhalf_warnを設定してると、クライアントアプリでタイムラインが読み込まれない (#410)

This commit is contained in:
KMY(雪あすか) 2024-01-03 22:10:02 +09:00 committed by GitHub
parent 47489783bc
commit eee362b9e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 7 deletions

View file

@ -836,8 +836,9 @@ const startServer = async () => {
// custom_filters.action database column, it is an integer
// representing a value in an enum defined by Ruby on Rails:
//
// enum { warn: 0, hide: 1 }
filter_action: ['warn', 'hide', 'half_warn'][filter.filter_action],
// enum { warn: 0, hide: 1, half_warn: 2 }
filter_action: ['warn', 'hide', 'half_warn'][Math.min(filter.filter_action, 1)],
filter_action_ex: ['warn', 'hide', 'half_warn'][filter.filter_action],
with_quote: filter.with_quote,
excludeFollows: filter.exclude_follows,
excludeLocalusers: filter.exclude_localusers,