diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-11 16:16:33 +0200 |
---|---|---|
committer | Claire <claire.github-309c@sitedethib.com> | 2022-04-11 16:16:33 +0200 |
commit | f9fbff8539996aca7b0dfbc906389393dbd408d7 (patch) | |
tree | 85ff487335ba5ae3142c7c14f9b1270c1d553e4e /app | |
parent | f2b2614d0a3852259f21f7969a946fb3d8b7e96d (diff) | |
parent | dc503472477000597f2ff1b6a5c37e8ac4dd2d8c (diff) |
Merge branch 'main' into glitch-soc/merge-upstream
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 |