diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-11 22:36:22 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-11 22:36:22 +0200 |
commit | b9b9192432be6b77f8e53138f4f10af298e63edc (patch) | |
tree | 85ff487335ba5ae3142c7c14f9b1270c1d553e4e /app | |
parent | f2b2614d0a3852259f21f7969a946fb3d8b7e96d (diff) | |
parent | f9fbff8539996aca7b0dfbc906389393dbd408d7 (diff) |
Merge pull request #1741 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app')
-rw-r--r-- | app/models/account_alias.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/account_alias.rb b/app/models/account_alias.rb index 3d659142a..b421c66e2 100644 --- a/app/models/account_alias.rb +++ b/app/models/account_alias.rb @@ -28,6 +28,11 @@ class AccountAlias < ApplicationRecord super(val.start_with?('@') ? val[1..-1] : val) end + def pretty_acct + username, domain = acct.split('@') + domain.nil? ? username : "#{username}@#{Addressable::IDNA.to_unicode(domain)}" + end + private def set_uri |