mirror of
https://github.com/mastodon/mastodon.git
synced 2024-08-20 21:08:15 -07:00
Fix crash in alias settings page (#18004)
This commit is contained in:
parent
ed5491e5de
commit
dc50347247
1 changed files with 5 additions and 0 deletions
|
@ -28,6 +28,11 @@ class AccountAlias < ApplicationRecord
|
||||||
super(val.start_with?('@') ? val[1..-1] : val)
|
super(val.start_with?('@') ? val[1..-1] : val)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def pretty_acct
|
||||||
|
username, domain = acct.split('@')
|
||||||
|
domain.nil? ? username : "#{username}@#{Addressable::IDNA.to_unicode(domain)}"
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def set_uri
|
def set_uri
|
||||||
|
|
Loading…
Reference in a new issue