forked from mastodon/mastodon
-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
88 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# frozen_string_literal: true | ||
|
||
module KmyblueCapabilitiesHelper | ||
def fedibird_capabilities | ||
capabilities = [ | ||
:enable_wide_emoji, | ||
:kmyblue_searchability, | ||
:searchability, | ||
:kmyblue_markdown, | ||
:kmyblue_reaction_deck, | ||
:kmyblue_visibility_login, | ||
:status_reference, | ||
:visibility_mutual, | ||
:visibility_limited, | ||
:kmyblue_limited_scope, | ||
:kmyblue_antenna, | ||
:kmyblue_bookmark_category, | ||
:kmyblue_quote, | ||
:kmyblue_searchability_limited, | ||
:kmyblue_visibility_public_unlisted, | ||
] | ||
|
||
capabilities << :profile_search unless Chewy.enabled? | ||
if Setting.enable_emoji_reaction | ||
capabilities << :emoji_reaction | ||
capabilities << :enable_wide_emoji_reaction | ||
end | ||
|
||
capabilities | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
describe NodeInfo::Serializer do # rubocop:disable RSpec/FilePath | ||
let(:serialization) do | ||
JSON.parse( | ||
ActiveModelSerializers::SerializableResource.new( | ||
record, adapter: NodeInfo::Adapter, serializer: described_class, root: 'nodeinfo' | ||
).to_json | ||
) | ||
end | ||
let(:record) { {} } | ||
|
||
describe 'nodeinfo version' do | ||
it 'returns 2.0' do | ||
expect(serialization['version']).to eq '2.0' | ||
end | ||
end | ||
|
||
describe 'mastodon version' do | ||
it 'contains kmyblue' do | ||
expect(serialization['software']['version'].include?('kmyblue')).to be true | ||
end | ||
end | ||
|
||
describe 'metadata' do | ||
it 'returns features' do | ||
expect(serialization['metadata']['features']).to include 'emoji_reaction' | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters