Commit 948ba449 authored by Rob Colbert's avatar Rob Colbert

revert OStatus xmlns to mastodon.social

parent b4d3acc1
......@@ -90,7 +90,7 @@ class OStatus::Activity::Creation < OStatus::Activity::Base
end
def visibility_scope
@xml.at_xpath('./gabsocial:scope', gabsocial: OStatus::TagManager::GABSCL_XMLNS)&.content&.to_sym || :public
@xml.at_xpath('./gabsocial:scope', gabsocial: OStatus::TagManager::MTDN_XMLNS)&.content&.to_sym || :public
end
def published
......
......@@ -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::GABSCL_XMLNS
parent['xmlns:gabsocial'] = OStatus::TagManager::MTDN_XMLNS
end
def serialize_status_attributes(entry, status)
......
......@@ -15,8 +15,8 @@ class OStatus::TagManager
authorize: 'http://activitystrea.ms/schema/1.0/authorize',
reject: 'http://activitystrea.ms/schema/1.0/reject',
unfollow: 'http://ostatus.org/schema/1.0/unfollow',
block: 'http://gab.com/schema/1.0/block',
unblock: 'http://gab.com/schema/1.0/unblock',
block: 'http://mastodon.social/schema/1.0/block',
unblock: 'http://mastodon.social/schema/1.0/unblock',
}.freeze
TYPES = {
......@@ -39,7 +39,7 @@ class OStatus::TagManager
POCO_XMLNS = 'http://portablecontacts.net/spec/1.0'
DFRN_XMLNS = 'http://purl.org/macgirvin/dfrn/1.0'
OS_XMLNS = 'http://ostatus.org/schema/1.0'
GABSCL_XMLNS = 'http://gab.com/schema/1.0'
MTDN_XMLNS = 'http://mastodon.social/schema/1.0'
def unique_tag(date, id, type)
"tag:#{Rails.configuration.x.local_domain},#{date.strftime('%Y-%m-%d')}:objectId=#{id}:objectType=#{type}"
......
......@@ -30,7 +30,7 @@ class RemoteProfile
end
def scope
@scope ||= author.at_xpath('./gabsocial:scope', gabsocial: OStatus::TagManager::GABSCL_XMLNS)&.content
@scope ||= author.at_xpath('./gabsocial:scope', gabsocial: OStatus::TagManager::MTDN_XMLNS)&.content
end
def avatar
......
......@@ -50,7 +50,7 @@ RSpec.describe OStatus::AtomSerializer do
expect(element['xmlns:poco']).to eq OStatus::TagManager::POCO_XMLNS
expect(element['xmlns:media']).to eq OStatus::TagManager::MEDIA_XMLNS
expect(element['xmlns:ostatus']).to eq OStatus::TagManager::OS_XMLNS
expect(element['xmlns:gabsocial']).to eq OStatus::TagManager::GABSCL_XMLNS
expect(element['xmlns:gabsocial']).to eq OStatus::TagManager::MTDN_XMLNS
end
end
......
......@@ -92,7 +92,7 @@ RSpec.describe RemoteProfile do
it 'calls author.at_xpath.content' do
expect(author).to receive_message_chain(:at_xpath, :content).with(
'./gabsocial:scope',
gabsocial: OStatus::TagManager::GABSCL_XMLNS
gabsocial: OStatus::TagManager::MTDN_XMLNS
).with(no_args)
remote_profile.scope
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment