mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 08:33:41 +01:00
Fix error when encountering malformed Tag objects from Kbin (#28235)
This commit is contained in:
parent
2d2e23c68d
commit
d0a5ebf914
1 changed files with 2 additions and 2 deletions
|
@ -170,9 +170,9 @@ class ActivityPub::ProcessStatusUpdateService < BaseService
|
||||||
|
|
||||||
as_array(@json['tag']).each do |tag|
|
as_array(@json['tag']).each do |tag|
|
||||||
if equals_or_includes?(tag['type'], 'Hashtag')
|
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')
|
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')
|
elsif equals_or_includes?(tag['type'], 'Emoji')
|
||||||
@raw_emojis << tag
|
@raw_emojis << tag
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue