Fix crash when likes or shares collections are not inlined, for real (#34619)
This commit is contained in:
@@ -95,11 +95,11 @@ class ActivityPub::Parser::StatusParser
|
||||
end
|
||||
|
||||
def favourites_count
|
||||
@object.dig('likes', 'totalItems') if @object.is_a?(Hash)
|
||||
@object['likes']['totalItems'] if @object.is_a?(Hash) && @object['likes'].is_a?(Hash)
|
||||
end
|
||||
|
||||
def reblogs_count
|
||||
@object.dig('shares', 'totalItems') if @object.is_a?(Hash)
|
||||
@object['shares']['totalItems'] if @object.is_a?(Hash) && @object['shares'].is_a?(Hash)
|
||||
end
|
||||
|
||||
def quote_policy
|
||||
|
||||
Reference in New Issue
Block a user