about summary refs log tree commit diff
path: root/app/models/concerns
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2023-01-18 17:38:11 +0100
committerClaire <claire.github-309c@sitedethib.com>2023-01-18 17:38:11 +0100
commit60abcb3c4c4ba899f0b4bb477c1629ecc2cd4a59 (patch)
tree02c9edee1c75254299e5385966eb8508f6ec0670 /app/models/concerns
parent472fd4307f9c963aba57e537e3ca3a8f94dfa139 (diff)
parent3588fbc76641311ab97ef530e2df4df4934805c5 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Conflicts:
- `config/i18n-tasks.yml`:
  Upstream added new ignored strings, glitch-soc has extra ignored strings
  because of the theming system.
  Added upstream's changes.
Diffstat (limited to 'app/models/concerns')
-rw-r--r--app/models/concerns/account_finder_concern.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/concerns/account_finder_concern.rb b/app/models/concerns/account_finder_concern.rb
index e8b804934..37c3b8895 100644
--- a/app/models/concerns/account_finder_concern.rb
+++ b/app/models/concerns/account_finder_concern.rb
@@ -13,9 +13,11 @@ module AccountFinderConcern
     end
 
     def representative
-      Account.find(-99).tap(&:ensure_keys!)
+      actor = Account.find(-99).tap(&:ensure_keys!)
+      actor.update!(username: 'mastodon.internal') if actor.username.include?(':')
+      actor
     rescue ActiveRecord::RecordNotFound
-      Account.create!(id: -99, actor_type: 'Application', locked: true, username: Rails.configuration.x.local_domain)
+      Account.create!(id: -99, actor_type: 'Application', locked: true, username: 'mastodon.internal')
     end
 
     def find_local(username)