Clean up generation of account webfinger string (#1477)
* Consolidate webfinger string creation under Account#to_webfinger_s * Introduce Account#local_username_and_domain for consolidation
This commit is contained in:
@ -120,6 +120,14 @@ class Account < ApplicationRecord
|
||||
local? ? username : "#{username}@#{domain}"
|
||||
end
|
||||
|
||||
def local_username_and_domain
|
||||
"#{username}@#{Rails.configuration.x.local_domain}"
|
||||
end
|
||||
|
||||
def to_webfinger_s
|
||||
"acct:#{local_username_and_domain}"
|
||||
end
|
||||
|
||||
def subscribed?
|
||||
!subscription_expires_at.blank?
|
||||
end
|
||||
|
Reference in New Issue
Block a user