Changing the use of config constants to the Rails configuration object
This commit is contained in:
parent
0e8f59c16f
commit
23d08c6749
11 changed files with 17 additions and 17 deletions
|
@ -9,7 +9,7 @@ class FollowService < BaseService
|
|||
|
||||
follow = source_account.follow!(target_account)
|
||||
send_interaction_service.(follow.stream_entry, target_account)
|
||||
source_account.ping!(account_url(account, format: 'atom'), [HUB_URL])
|
||||
source_account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
@ -7,7 +7,7 @@ class PostStatusService < BaseService
|
|||
def call(account, text, in_reply_to = nil)
|
||||
status = account.statuses.create!(text: text, thread: in_reply_to)
|
||||
process_mentions_service.(status)
|
||||
account.ping!(account_url(account, format: 'atom'), [HUB_URL])
|
||||
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
|
||||
status
|
||||
end
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class ProcessFeedService < BaseService
|
|||
|
||||
href = Addressable::URI.parse(mention_link.attribute('href').value)
|
||||
|
||||
if href.host == LOCAL_DOMAIN
|
||||
if href.host == Rails.configuration.x.local_domain
|
||||
mentioned_account = Account.find_by(username: href.path.gsub('/users/', ''), domain: nil)
|
||||
|
||||
unless mentioned_account.nil?
|
||||
|
|
|
@ -5,7 +5,7 @@ class ReblogService < BaseService
|
|||
# @return [Status]
|
||||
def call(account, reblogged_status)
|
||||
reblog = account.statuses.create!(reblog: reblogged_status, text: '')
|
||||
account.ping!(account_url(account, format: 'atom'), [HUB_URL])
|
||||
account.ping!(account_url(account, format: 'atom'), [Rails.configuration.x.hub_url])
|
||||
return reblog if reblogged_status.local?
|
||||
send_interaction_service.(reblog.stream_entry, reblogged_status.account)
|
||||
reblog
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue