0
0
Fork 0

Use likes and shares totalItems on status creations and updates (#32620)

This commit is contained in:
Jonny Saunders 2024-10-27 21:55:18 -07:00 committed by GitHub
parent 77cd16f4ee
commit 9074c1fac9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 326 additions and 14 deletions

View file

@ -93,6 +93,14 @@ class ActivityPub::Parser::StatusParser
lang.presence && NORMALIZED_LOCALE_NAMES.fetch(lang.downcase.to_sym, lang)
end
def favourites_count
@object.dig(:likes, :totalItems)
end
def reblogs_count
@object.dig(:shares, :totalItems)
end
private
def raw_language_code