Merge branch 'kb-draft-7.0' into kb_development
This commit is contained in:
commit
5b21964bda
8 changed files with 58 additions and 6 deletions
|
@ -16,6 +16,10 @@ All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
|
- Fix some remote posts getting truncated ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27307))
|
||||||
|
- Fix some cases of infinite scroll code trying to fetch inaccessible posts in a loop ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27286))
|
||||||
|
- Fix `Vary` headers not being set on some redirects ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27272))
|
||||||
|
- Fix mentions being matched in some URL query strings ([mjankowski](https://github.com/mastodon/mastodon/pull/25656))
|
||||||
- Fix unexpected linebreak in version string in the Web UI ([vmstan](https://github.com/mastodon/mastodon/pull/26986))
|
- Fix unexpected linebreak in version string in the Web UI ([vmstan](https://github.com/mastodon/mastodon/pull/26986))
|
||||||
- Fix double scroll bars in some columns in advanced interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27187))
|
- Fix double scroll bars in some columns in advanced interface ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27187))
|
||||||
- Fix boosts of local users being filtered in account timelines ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27204))
|
- Fix boosts of local users being filtered in account timelines ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27204))
|
||||||
|
@ -32,7 +36,7 @@ All notable changes to this project will be documented in this file.
|
||||||
- Fix retention dashboard not displaying correct month ([vmstan](https://github.com/mastodon/mastodon/pull/27180))
|
- Fix retention dashboard not displaying correct month ([vmstan](https://github.com/mastodon/mastodon/pull/27180))
|
||||||
- Fix tIME chunk not being properly removed from PNG uploads ([TheEssem](https://github.com/mastodon/mastodon/pull/27111))
|
- Fix tIME chunk not being properly removed from PNG uploads ([TheEssem](https://github.com/mastodon/mastodon/pull/27111))
|
||||||
- Fix division by zero in video in bitrate computation code ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27129))
|
- Fix division by zero in video in bitrate computation code ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27129))
|
||||||
- Fix inefficient queries in “Follows and followers” as well as several admin pages ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27116))
|
- Fix inefficient queries in “Follows and followers” as well as several admin pages ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27116), [ClearlyClaire](https://github.com/mastodon/mastodon/pull/27306))
|
||||||
- Fix ActiveRecord using two connection pools when no replica is defined ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27061))
|
- Fix ActiveRecord using two connection pools when no replica is defined ([ClearlyClaire](https://github.com/mastodon/mastodon/pull/27061))
|
||||||
- Fix the search documentation URL in system checks ([renchap](https://github.com/mastodon/mastodon/pull/27036))
|
- Fix the search documentation URL in system checks ([renchap](https://github.com/mastodon/mastodon/pull/27036))
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Api::V1::StatusesController < Api::BaseController
|
||||||
|
|
||||||
ancestors_results = @status.in_reply_to_id.nil? ? [] : @status.ancestors(ancestors_limit, current_account)
|
ancestors_results = @status.in_reply_to_id.nil? ? [] : @status.ancestors(ancestors_limit, current_account)
|
||||||
descendants_results = @status.descendants(descendants_limit, current_account, descendants_depth_limit)
|
descendants_results = @status.descendants(descendants_limit, current_account, descendants_depth_limit)
|
||||||
references_results = @status.references
|
references_results = @status.readable_references(current_account)
|
||||||
loaded_ancestors = cache_collection(ancestors_results, Status)
|
loaded_ancestors = cache_collection(ancestors_results, Status)
|
||||||
loaded_descendants = cache_collection(descendants_results, Status)
|
loaded_descendants = cache_collection(descendants_results, Status)
|
||||||
loaded_references = cache_collection(references_results, Status)
|
loaded_references = cache_collection(references_results, Status)
|
||||||
|
|
|
@ -18,6 +18,7 @@ module KmyblueCapabilitiesHelper
|
||||||
:kmyblue_quote,
|
:kmyblue_quote,
|
||||||
:kmyblue_searchability_limited,
|
:kmyblue_searchability_limited,
|
||||||
:kmyblue_searchability_public_unlisted,
|
:kmyblue_searchability_public_unlisted,
|
||||||
|
:kmyblue_circle_history,
|
||||||
]
|
]
|
||||||
|
|
||||||
capabilities << :profile_search unless Chewy.enabled?
|
capabilities << :profile_search unless Chewy.enabled?
|
||||||
|
|
|
@ -11,6 +11,15 @@ module StatusThreadingConcern
|
||||||
find_statuses_from_tree_path(descendant_ids(limit, depth), account, promote: true)
|
find_statuses_from_tree_path(descendant_ids(limit, depth), account, promote: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def readable_references(account = nil)
|
||||||
|
statuses = references.to_a
|
||||||
|
account_ids = statuses.map(&:account_id).uniq
|
||||||
|
domains = statuses.filter_map(&:account_domain).uniq
|
||||||
|
relations = account&.relations_map(account_ids, domains) || {}
|
||||||
|
statuses.reject! { |status| StatusFilter.new(status, account, relations).filtered? }
|
||||||
|
statuses
|
||||||
|
end
|
||||||
|
|
||||||
def self_replies(limit)
|
def self_replies(limit)
|
||||||
account.statuses.where(in_reply_to_id: id, visibility: [:public, :unlisted, :public_unlisted, :login]).reorder(id: :asc).limit(limit)
|
account.statuses.where(in_reply_to_id: id, visibility: [:public, :unlisted, :public_unlisted, :login]).reorder(id: :asc).limit(limit)
|
||||||
end
|
end
|
||||||
|
|
|
@ -40,7 +40,7 @@ class NodeInfo::Serializer < ActiveModel::Serializer
|
||||||
|
|
||||||
def metadata
|
def metadata
|
||||||
{
|
{
|
||||||
fedibird_capabilities: fedibird_capabilities,
|
features: fedibird_capabilities,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@ module Mastodon
|
||||||
module_function
|
module_function
|
||||||
|
|
||||||
def kmyblue_major
|
def kmyblue_major
|
||||||
6
|
7
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_minor
|
def kmyblue_minor
|
||||||
0
|
1
|
||||||
end
|
end
|
||||||
|
|
||||||
def kmyblue_flag
|
def kmyblue_flag
|
||||||
|
@ -21,7 +21,7 @@ module Mastodon
|
||||||
end
|
end
|
||||||
|
|
||||||
def minor
|
def minor
|
||||||
3
|
2
|
||||||
end
|
end
|
||||||
|
|
||||||
def patch
|
def patch
|
||||||
|
|
32
spec/serializers/nodeinfo/serializer_spec.rb
Normal file
32
spec/serializers/nodeinfo/serializer_spec.rb
Normal file
|
@ -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
|
|
@ -17,4 +17,10 @@ describe REST::InstanceSerializer do
|
||||||
expect(serialization['usage']).to eq({ 'users' => { 'active_month' => 0 } })
|
expect(serialization['usage']).to eq({ 'users' => { 'active_month' => 0 } })
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
describe 'fedibird_capabilities' do
|
||||||
|
it 'returns fedibird_capabilities' do
|
||||||
|
expect(serialization['fedibird_capabilities']).to include 'emoji_reaction'
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue