From 92e7c84969a31c3bb47d62d5c8360dde850b4fba Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Mon, 3 Feb 2020 21:16:37 +0100 Subject: Fix punycode being returned in some entities instead of unicode in REST API (#13035) --- app/serializers/rest/announcement_serializer.rb | 4 ++++ app/serializers/rest/status_serializer.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/serializers/rest/announcement_serializer.rb b/app/serializers/rest/announcement_serializer.rb index ae72f9ace..f27feb669 100644 --- a/app/serializers/rest/announcement_serializer.rb +++ b/app/serializers/rest/announcement_serializer.rb @@ -41,5 +41,9 @@ class REST::AnnouncementSerializer < ActiveModel::Serializer def url ActivityPub::TagManager.instance.url_for(object) end + + def acct + object.pretty_acct + end end end diff --git a/app/serializers/rest/status_serializer.rb b/app/serializers/rest/status_serializer.rb index 1ed8948da..0109de882 100644 --- a/app/serializers/rest/status_serializer.rb +++ b/app/serializers/rest/status_serializer.rb @@ -145,7 +145,7 @@ class REST::StatusSerializer < ActiveModel::Serializer end def acct - object.account_acct + object.account.pretty_acct end end -- cgit