Module: NewsmastMastodon::Concerns::UserConcern
- Extended by:
- ActiveSupport::Concern
- Defined in:
- app/models/newsmast_mastodon/concerns/user_concern.rb
Constant Summary collapse
- DOMAIN_FILTERS =
{ 'Threads': ['threads.social', 'threads.net'].freeze, 'Bluesky': ['bridgy.fed', 'bluesky.social'].freeze }.freeze
Instance Method Summary collapse
Methods included from PatchworkHelper
#patchwork_community_admin_exist?, #patchwork_server_settings_exist?, #patchwork_table_exists?
Methods included from EmailNotificationAttributesConcern
#email_notification_attributes
Instance Method Details
#get_server_setting_exclude_domains ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# File 'app/models/newsmast_mastodon/concerns/user_concern.rb', line 23 def get_server_setting_exclude_domains filter_domains = [] DOMAIN_FILTERS.each do |setting, domains| federation = NewsmastMastodon::ServerSetting.where(name: setting.to_s).first filter_domains.concat(domains) if federation && federation.value? end filter_domains end |