1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-28 06:48:45 +09:00

Fix crash in alias settings page (#18004)

This commit is contained in:
Claire 2022-04-09 20:11:06 +02:00 committed by GitHub
parent ed5491e5de
commit dc50347247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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