about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2020-02-03 21:16:37 +0100
committerGitHub <noreply@github.com>2020-02-03 21:16:37 +0100
commit92e7c84969a31c3bb47d62d5c8360dde850b4fba (patch)
tree535b16eb53994aaac7546da82c35446adef9bdef /app
parentff07e80533814b8a5a44d9cf376e3ee7ba6b3318 (diff)
Fix punycode being returned in some entities instead of unicode in REST API (#13035)
Diffstat (limited to 'app')
-rw-r--r--app/serializers/rest/announcement_serializer.rb4
-rw-r--r--app/serializers/rest/status_serializer.rb2
2 files changed, 5 insertions, 1 deletions
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