ソースを参照
Do not re-query mentions from serializers (#6858)
Fix performance regression from #6836
master
Eugen Rochko
6年前
committed by
GitHub
この署名に対応する既知のキーがデータベースに存在しません
GPGキーID: 4AEE18F83AFDEB23
-
app/serializers/activitypub/note_serializer.rb
-
app/serializers/rest/status_serializer.rb
|
|
@@ -57,7 +57,7 @@ class ActivityPub::NoteSerializer < ActiveModel::Serializer |
|
|
|
end |
|
|
|
|
|
|
|
def virtual_tags |
|
|
|
object.mentions.order(:id) + object.tags + object.emojis |
|
|
|
object.mentions.to_a.sort_by(&:id) + object.tags + object.emojis |
|
|
|
end |
|
|
|
|
|
|
|
def atom_uri |
|
|
|
|
|
@@ -87,7 +87,7 @@ class REST::StatusSerializer < ActiveModel::Serializer |
|
|
|
end |
|
|
|
|
|
|
|
def ordered_mentions |
|
|
|
object.mentions.order(:id) |
|
|
|
object.mentions.to_a.sort_by(&:id) |
|
|
|
end |
|
|
|
|
|
|
|
class ApplicationSerializer < ActiveModel::Serializer |
|
|
|