Skip to content

Commit

Permalink
quote_idquote_of_idになったのをSerializerに反映
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Oct 1, 2023
1 parent 5a51b43 commit 3abf084
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/models/status.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,10 @@ def reblog?
!reblog_of_id.nil?
end

def quote?
!quote_of_id.nil?
end

delegate :id, to: :quote, prefix: true

def within_realtime_window?
Expand Down
2 changes: 1 addition & 1 deletion app/serializers/rest/status_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def reactions
end

def quote_id
object.quote&.id
object.quote_of_id
end

def reblogged
Expand Down

0 comments on commit 3abf084

Please sign in to comment.