Compare commits

..

No commits in common. "3213835e3397a0f3d88661373380e76ddaf683a1" and "9fba3359374f683fde59b0d10a164901f2ada86d" have entirely different histories.

8 changed files with 13 additions and 45 deletions

View file

@ -120,7 +120,6 @@ jobs:
ruby-version: ruby-version:
- '3.1' - '3.1'
- '.ruby-version' - '.ruby-version'
- '3.3'
ci_job: ci_job:
- 1 - 1
- 2 - 2
@ -199,7 +198,6 @@ jobs:
ruby-version: ruby-version:
- '3.1' - '3.1'
- '.ruby-version' - '.ruby-version'
- '3.3'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@ -312,7 +310,6 @@ jobs:
ruby-version: ruby-version:
- '3.1' - '3.1'
- '.ruby-version' - '.ruby-version'
- '3.3'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -2,17 +2,6 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [4.2.18] - 2025-03-10
### Changed
- Change hashtag suggestion to prefer personal history capitalization (#34070 by @ClearlyClaire)
### Fixed
- Fix processing errors for some HEIF images from iOS 18 (#34086 by @renchap)
- Fix streaming server not filtering unknown-language posts from public timelines (#33774 by @ClearlyClaire)
## [4.2.17] - 2025-02-27 ## [4.2.17] - 2025-02-27
### Security ### Security

View file

@ -57,9 +57,6 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND="noninteractive" \ ENV DEBIAN_FRONTEND="noninteractive" \
PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin" PATH="${PATH}:/opt/ruby/bin:/opt/mastodon/bin"
# Add backport repository for some specific packages where we need the latest version
RUN echo 'deb http://deb.debian.org/debian bookworm-backports main' >> /etc/apt/sources.list
# Ignoring these here since we don't want to pin any versions and the Debian image removes apt-get content after use # Ignoring these here since we don't want to pin any versions and the Debian image removes apt-get content after use
# hadolint ignore=DL3008,DL3009 # hadolint ignore=DL3008,DL3009
RUN apt-get update && \ RUN apt-get update && \
@ -77,7 +74,6 @@ RUN apt-get update && \
libicu72 \ libicu72 \
libidn12 \ libidn12 \
libyaml-0-2 \ libyaml-0-2 \
libheif1/bookworm-backports \
file \ file \
ca-certificates \ ca-certificates \
tzdata \ tzdata \

View file

@ -254,26 +254,12 @@ const expiresInFromExpiresAt = expires_at => {
const mergeLocalHashtagResults = (suggestions, prefix, tagHistory) => { const mergeLocalHashtagResults = (suggestions, prefix, tagHistory) => {
prefix = prefix.toLowerCase(); prefix = prefix.toLowerCase();
if (suggestions.length < 4) { if (suggestions.length < 4) {
const localTags = tagHistory.filter(tag => tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase())); const localTags = tagHistory.filter(tag => tag.toLowerCase().startsWith(prefix) && !suggestions.some(suggestion => suggestion.type === 'hashtag' && suggestion.name.toLowerCase() === tag.toLowerCase()));
suggestions = suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag }))); return suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag })));
} else {
return suggestions;
} }
// Prefer capitalization from personal history, unless personal history is all lower-case
const fixSuggestionCapitalization = (suggestion) => {
if (suggestion.type !== 'hashtag')
return suggestion;
const tagFromHistory = tagHistory.find((tag) => tag.localeCompare(suggestion.name, undefined, { sensitivity: 'accent' }) === 0);
if (!tagFromHistory || tagFromHistory.toLowerCase() === tagFromHistory)
return suggestion;
return { ...suggestion, name: tagFromHistory };
};
return suggestions.map(fixSuggestionCapitalization);
}; };
const normalizeSuggestions = (state, { accounts, emojis, tags, token }) => { const normalizeSuggestions = (state, { accounts, emojis, tags, token }) => {

View file

@ -56,7 +56,7 @@ services:
web: web:
build: . build: .
image: ghcr.io/mastodon/mastodon:v4.2.18 image: ghcr.io/mastodon/mastodon:v4.2.17
restart: always restart: always
env_file: .env.production env_file: .env.production
command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000" command: bash -c "rm -f /mastodon/tmp/pids/server.pid; bundle exec rails s -p 3000"
@ -77,7 +77,7 @@ services:
streaming: streaming:
build: . build: .
image: ghcr.io/mastodon/mastodon:v4.2.18 image: ghcr.io/mastodon/mastodon:v4.2.17
restart: always restart: always
env_file: .env.production env_file: .env.production
command: node ./streaming command: node ./streaming
@ -95,7 +95,7 @@ services:
sidekiq: sidekiq:
build: . build: .
image: ghcr.io/mastodon/mastodon:v4.2.18 image: ghcr.io/mastodon/mastodon:v4.2.17
restart: always restart: always
env_file: .env.production env_file: .env.production
command: bundle exec sidekiq command: bundle exec sidekiq

View file

@ -13,7 +13,7 @@ module Mastodon
end end
def patch def patch
18 17
end end
def default_prerelease def default_prerelease

View file

@ -33,12 +33,12 @@ describe RequestPool do
subject subject
threads = Array.new(5) do threads = Array.new(20) do |_i|
Thread.new do Thread.new do
20.times do
subject.with('http://example.com') do |http_client| subject.with('http://example.com') do |http_client|
http_client.get('/').flush http_client.get('/').flush
# Nudge scheduler to yield and exercise the full pool end
sleep(0.01)
end end
end end
end end

View file

@ -789,7 +789,7 @@ const startServer = async () => {
// filtering of statuses: // filtering of statuses:
// Filter based on language: // Filter based on language:
if (Array.isArray(req.chosenLanguages) && req.chosenLanguages.indexOf(payload.language) === -1) { if (Array.isArray(req.chosenLanguages) && payload.language !== null && req.chosenLanguages.indexOf(payload.language) === -1) {
log.silly(req.requestId, `Message ${payload.id} filtered by language (${payload.language})`); log.silly(req.requestId, `Message ${payload.id} filtered by language (${payload.language})`);
return; return;
} }