Merge commit '3ed9b55cb3987e3d32c56f857cb6903ca8bec3d4' into glitch-soc/merge-upstream

This commit is contained in:
Claire
2023-07-13 14:02:28 +02:00
8 changed files with 116 additions and 89 deletions

View File

@@ -33,7 +33,7 @@ class Web::NotificationSerializer < ActiveModel::Serializer
end
def body
str = strip_tags(object.target_status&.spoiler_text&.presence || object.target_status&.text || object.from_account.note)
str = strip_tags(object.target_status&.spoiler_text.presence || object.target_status&.text || object.from_account.note)
truncate(HTMLEntities.new.decode(str.to_str), length: 140, escape: false) # Do not encode entities, since this value will not be used in HTML
end
end