Fix error when encountering malformed Tag objects from Kbin (#28235)

fixes/small-otp-secret-length-4.1
Jonathan de Jong 2023-12-05 14:59:15 +01:00 committed by Claire
parent 3e9238de47
commit a046dcefe6
1 changed files with 2 additions and 2 deletions

View File

@ -174,9 +174,9 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
as_array(@json['tag']).each do |tag|
if equals_or_includes?(tag['type'], 'Hashtag')
@raw_tags << tag['name']
@raw_tags << tag['name'] if tag['name'].present?
elsif equals_or_includes?(tag['type'], 'Mention')
@raw_mentions << tag['href']
@raw_mentions << tag['href'] if tag['href'].present?
elsif equals_or_includes?(tag['type'], 'Emoji')
@raw_emojis << tag
end