Improve bio compatibility (#2278)
* Fix #1057 (close #1819) - Move HTML-formatted bio from <poco:note /> to <summary type="html" /> * Ensure <poco:note /> is plaintext for remote accounts, also, by stripping out HTML
This commit is contained in:
@ -13,8 +13,8 @@ class UpdateRemoteProfileService < BaseService
|
||||
hub_link = xml.at_xpath('./xmlns:link[@rel="hub"]', xmlns: TagManager::XMLNS)
|
||||
|
||||
unless author_xml.nil?
|
||||
account.display_name = author_xml.at_xpath('./poco:displayName', poco: TagManager::POCO_XMLNS).content unless author_xml.at_xpath('./poco:displayName', poco: TagManager::POCO_XMLNS).nil?
|
||||
account.note = author_xml.at_xpath('./poco:note', poco: TagManager::POCO_XMLNS).content unless author_xml.at_xpath('./poco:note', poco: TagManager::POCO_XMLNS).nil?
|
||||
account.display_name = author_xml.at_xpath('./poco:displayName', poco: TagManager::POCO_XMLNS)&.content || ''
|
||||
account.note = author_xml.at_xpath('./xmlns:summary', xmlns: TagManager::XMLNS)&.content || author_xml.at_xpath('./poco:note', poco: TagManager::POCO_XMLNS)&.content || ''
|
||||
account.locked = author_xml.at_xpath('./mastodon:scope', mastodon: TagManager::MTDN_XMLNS)&.content == 'private'
|
||||
|
||||
if !account.suspended? && !DomainBlock.find_by(domain: account.domain)&.reject_media?
|
||||
|
Reference in New Issue
Block a user