about summary refs log tree commit diff
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/account.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/account.rb b/app/models/account.rb
index c59c76009..a482fc8e6 100644
--- a/app/models/account.rb
+++ b/app/models/account.rb
@@ -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