Add antenna ignore reboot setting
This commit is contained in:
parent
7c31932828
commit
1c174a6f7b
8 changed files with 21 additions and 3 deletions
|
@ -59,7 +59,7 @@ class AntennasController < ApplicationController
|
|||
end
|
||||
|
||||
def resource_params
|
||||
params.require(:antenna).permit(:title, :list, :available, :expires_in, :with_media_only, :keywords_raw, :exclude_keywords_raw, :domains_raw, :exclude_domains_raw, :accounts_raw, :exclude_accounts_raw, :tags_raw, :exclude_tags_raw)
|
||||
params.require(:antenna).permit(:title, :list, :available, :expires_in, :with_media_only, :ignore_reblog, :keywords_raw, :exclude_keywords_raw, :domains_raw, :exclude_domains_raw, :accounts_raw, :exclude_accounts_raw, :tags_raw, :exclude_tags_raw)
|
||||
end
|
||||
|
||||
def thin_resource_params
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
# exclude_accounts :jsonb
|
||||
# exclude_tags :jsonb
|
||||
# stl :boolean default(FALSE), not null
|
||||
# ignore_reblog :boolean default(FALSE), not null
|
||||
#
|
||||
class Antenna < ApplicationRecord
|
||||
include Expireable
|
||||
|
|
|
@ -127,6 +127,7 @@ class FanOutOnWriteService < BaseService
|
|||
antennas = Antenna.availables
|
||||
antennas = antennas.left_joins(:antenna_domains).where(any_domains: true).or(Antenna.left_joins(:antenna_domains).where(antenna_domains: { name: domain }))
|
||||
antennas = antennas.where(with_media_only: false) unless @status.with_media?
|
||||
antennas = antennas.where(ignore_reblog: false) unless @status.reblog?
|
||||
antennas = antennas.where(stl: true) if @account.dissubscribable
|
||||
|
||||
antennas = Antenna.where(id: antennas.select(:id))
|
||||
|
|
|
@ -55,3 +55,5 @@
|
|||
%hr.spacer/
|
||||
.fields-group
|
||||
= f.input :with_media_only, wrapper: :with_label, label: t('antennas.edit.with_media_only'), hint: false
|
||||
.fields-group
|
||||
= f.input :ignore_reblog, wrapper: :with_label, label: t('antennas.edit.ignore_reblog'), hint: false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue