two more federation fixes

This commit is contained in:
Rob Colbert 2019-07-14 03:03:29 -04:00
parent fd50f03304
commit 0a95b2df66
2 changed files with 4 additions and 4 deletions

View File

@ -90,7 +90,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
end
def visibility_scope
@xml.at_xpath('./gabsocial:scope', gabsocial: OStatus::TagManager::MTDN_XMLNS)&.content&.to_sym || :public
@xml.at_xpath('./mastodon:scope', mastodon: OStatus::TagManager::MTDN_XMLNS)&.content&.to_sym || :public
end
def published

View File

@ -32,7 +32,7 @@ class OStatus::AtomSerializer
append_element(author, 'poco:preferredUsername', account.username)
append_element(author, 'poco:displayName', account.display_name) if account.display_name?
append_element(author, 'poco:note', account.local? ? account.note : strip_tags(account.note)) if account.note?
append_element(author, 'gabsocial:scope', account.locked? ? :private : :public)
append_element(author, 'mastodon:scope', account.locked? ? :private : :public)
author
end
@ -345,7 +345,7 @@ class OStatus::AtomSerializer
parent['xmlns:poco'] = OStatus::TagManager::POCO_XMLNS
parent['xmlns:media'] = OStatus::TagManager::MEDIA_XMLNS
parent['xmlns:ostatus'] = OStatus::TagManager::OS_XMLNS
parent['xmlns:gabsocial'] = OStatus::TagManager::MTDN_XMLNS
parent['xmlns:mastodon'] = OStatus::TagManager::MTDN_XMLNS
end
def serialize_status_attributes(entry, status)
@ -369,7 +369,7 @@ class OStatus::AtomSerializer
end
append_element(entry, 'category', nil, term: 'nsfw') if status.sensitive? && status.media_attachments.any?
append_element(entry, 'gabsocial:scope', status.visibility)
append_element(entry, 'mastodon:scope', status.visibility)
status.emojis.each do |emoji|
append_element(entry, 'link', nil, rel: :emoji, href: full_asset_url(emoji.image.url), name: emoji.shortcode)