Compare commits

...

14 Commits

Author SHA1 Message Date
Claire
e1ff48978d Merge pull request #2990 from glitch-soc/glitch-soc/merge-4.3
Merge upstream changes up to a8613b7cda in stable-4.3
2025-03-10 12:46:02 +01:00
Claire
24304fbbe6 [Glitch] Change hashtag suggestion to prefer personal history capitalization
Port 62f019252a to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-03-10 12:25:32 +01:00
Claire
644caeb156 [Glitch] Fix preview cards under Content Warnings not being shown in detailed statuses
Port 1ed1cdba1b to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-03-10 12:25:06 +01:00
Claire
ad92660de6 [Glitch] Fix username and display name being hidden on narrow screens in moderation interface
Port b73e968641 to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-03-10 12:23:53 +01:00
Claire
c5d17a3997 Merge commit 'a8613b7cda61e46209cace4379a9dea81f45529e' into glitch-soc/merge-4.3 2025-03-10 12:20:09 +01:00
Claire
a8613b7cda Bump version to v4.3.5 2025-03-10 10:14:17 +01:00
Noel De Martin
0c2fa2aab4 Comment sidekiq build in docker compose (#33483) 2025-03-10 10:14:17 +01:00
Claire
62f019252a Change hashtag suggestion to prefer personal history capitalization (#34070) 2025-03-10 10:14:17 +01:00
Renaud Chaput
4228ca614c Fix processing errors for some HEIF images from iOS 18 (#34086) 2025-03-10 10:14:17 +01:00
Claire
7e20ee7695 Fix streaming server not filtering unknown-language posts from public timelines (#33774) 2025-03-10 10:14:17 +01:00
Claire
1ed1cdba1b Fix preview cards under Content Warnings not being shown in detailed statuses (#34068) 2025-03-10 10:14:17 +01:00
Claire
b73e968641 Fix username and display name being hidden on narrow screens in moderation interface (#33064) 2025-03-10 10:14:17 +01:00
Claire
559f7a8e61 [Glitch] Fix media preview height in compose form when 3 or more images are attached (#2988)
Port 50449ae7ac to glitch-soc

Signed-off-by: Claire <claire.github-309c@sitedethib.com>
2025-03-08 16:13:49 +01:00
Claire
bcfd6ab3e4 Add Ruby 3.4 to Mastodon 4.3 test matrix (#34028) 2025-02-28 11:17:18 +01:00
15 changed files with 78 additions and 24 deletions

View File

@@ -21,3 +21,4 @@ runs:
with: with:
ruby-version: ${{ inputs.ruby-version }} ruby-version: ${{ inputs.ruby-version }}
bundler-cache: true bundler-cache: true
cache-version: 4.3

View File

@@ -127,6 +127,7 @@ jobs:
- '3.1' - '3.1'
- '3.2' - '3.2'
- '.ruby-version' - '.ruby-version'
- '3.4'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -229,6 +230,7 @@ jobs:
- '3.1' - '3.1'
- '3.2' - '3.2'
- '.ruby-version' - '.ruby-version'
- '3.4'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -308,6 +310,7 @@ jobs:
- '3.1' - '3.1'
- '3.2' - '3.2'
- '.ruby-version' - '.ruby-version'
- '3.4'
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
@@ -425,6 +428,7 @@ jobs:
- '3.1' - '3.1'
- '3.2' - '3.2'
- '.ruby-version' - '.ruby-version'
- '3.4'
search-image: search-image:
- docker.elastic.co/elasticsearch/elasticsearch:7.17.13 - docker.elastic.co/elasticsearch/elasticsearch:7.17.13
include: include:

View File

@@ -2,6 +2,19 @@
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.3.5] - 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)
- Fix preview cards under Content Warnings not being shown in detailed statuses (#34068 by @ClearlyClaire)
- Fix username and display name being hidden on narrow screens in moderation interface (#33064 by @ClearlyClaire)
## [4.3.4] - 2025-02-27 ## [4.3.4] - 2025-02-27
### Security ### Security

View File

@@ -92,6 +92,9 @@ RUN \
# Set /opt/mastodon as working directory # Set /opt/mastodon as working directory
WORKDIR /opt/mastodon WORKDIR /opt/mastodon
# 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
# hadolint ignore=DL3008,DL3005 # hadolint ignore=DL3008,DL3005
RUN \ RUN \
# Mount Apt cache and lib directories from Docker buildx caches # Mount Apt cache and lib directories from Docker buildx caches
@@ -161,7 +164,7 @@ RUN \
libexif-dev \ libexif-dev \
libexpat1-dev \ libexpat1-dev \
libgirepository1.0-dev \ libgirepository1.0-dev \
libheif-dev \ libheif-dev/bookworm-backports \
libimagequant-dev \ libimagequant-dev \
libjpeg62-turbo-dev \ libjpeg62-turbo-dev \
liblcms2-dev \ liblcms2-dev \
@@ -344,7 +347,7 @@ RUN \
# libvips components # libvips components
libcgif0 \ libcgif0 \
libexif12 \ libexif12 \
libheif1 \ libheif1/bookworm-backports \
libimagequant0 \ libimagequant0 \
libjpeg62-turbo \ libjpeg62-turbo \
liblcms2-2 \ liblcms2-2 \

View File

@@ -270,11 +270,11 @@ GEM
ffi-compiler (1.3.2) ffi-compiler (1.3.2)
ffi (>= 1.15.5) ffi (>= 1.15.5)
rake rake
flatware (2.3.3) flatware (2.3.4)
drb drb
thor (< 2.0) thor (< 2.0)
flatware-rspec (2.3.3) flatware-rspec (2.3.4)
flatware (= 2.3.3) flatware (= 2.3.4)
rspec (>= 3.6) rspec (>= 3.6)
fog-core (2.5.0) fog-core (2.5.0)
builder builder
@@ -1065,4 +1065,4 @@ RUBY VERSION
ruby 3.3.4p94 ruby 3.3.4p94
BUNDLED WITH BUNDLED WITH
2.5.18 2.6.5

View File

@@ -273,12 +273,12 @@ export const DetailedStatus: React.FC<{
); );
mediaIcons.push('video-camera'); mediaIcons.push('video-camera');
} }
} else if (status.get('spoiler_text').length === 0) { } else if (status.get('card')) {
media.push( media.push(
<Card <Card
sensitive={status.get('sensitive')} sensitive={status.get('sensitive')}
onOpenMedia={onOpenMedia} onOpenMedia={onOpenMedia}
card={status.get('card', null)} card={status.get('card')}
/>, />,
); );
mediaIcons.push('link'); mediaIcons.push('link');

View File

@@ -330,12 +330,26 @@ 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()));
return suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag }))); suggestions = 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

@@ -7640,6 +7640,8 @@ img.modal-warning {
} }
&--layout-3 { &--layout-3 {
min-height: calc(64px * 2 + 8px);
& > .media-gallery__item:nth-child(1) { & > .media-gallery__item:nth-child(1) {
border-end-end-radius: 0; border-end-end-radius: 0;
border-start-end-radius: 0; border-start-end-radius: 0;
@@ -7659,6 +7661,8 @@ img.modal-warning {
} }
&--layout-4 { &--layout-4 {
min-height: calc(64px * 2 + 8px);
& > .media-gallery__item:nth-child(1) { & > .media-gallery__item:nth-child(1) {
border-end-end-radius: 0; border-end-end-radius: 0;
border-start-end-radius: 0; border-start-end-radius: 0;

View File

@@ -82,9 +82,9 @@
.accounts-table { .accounts-table {
width: 100%; width: 100%;
table-layout: fixed;
.account { .account {
max-width: calc(56px + 30ch);
padding: 0; padding: 0;
border: 0; border: 0;
} }

View File

@@ -219,12 +219,12 @@ export const DetailedStatus: React.FC<{
/> />
); );
} }
} else if (status.get('spoiler_text').length === 0) { } else if (status.get('card')) {
media = ( media = (
<Card <Card
sensitive={status.get('sensitive')} sensitive={status.get('sensitive')}
onOpenMedia={onOpenMedia} onOpenMedia={onOpenMedia}
card={status.get('card', null)} card={status.get('card')}
/> />
); );
} }

View File

@@ -254,12 +254,26 @@ 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()));
return suggestions.concat(localTags.slice(0, 4 - suggestions.length).toJS().map(tag => ({ type: 'hashtag', name: tag }))); suggestions = 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

@@ -82,9 +82,9 @@
.accounts-table { .accounts-table {
width: 100%; width: 100%;
table-layout: fixed;
.account { .account {
max-width: calc(56px + 30ch);
padding: 0; padding: 0;
border: 0; border: 0;
} }

View File

@@ -59,7 +59,7 @@ services:
web: web:
# You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes # You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
# build: . # build: .
image: ghcr.io/mastodon/mastodon:v4.3.4 image: ghcr.io/mastodon/mastodon:v4.3.5
restart: always restart: always
env_file: .env.production env_file: .env.production
command: bundle exec puma -C config/puma.rb command: bundle exec puma -C config/puma.rb
@@ -83,7 +83,7 @@ services:
# build: # build:
# dockerfile: ./streaming/Dockerfile # dockerfile: ./streaming/Dockerfile
# context: . # context: .
image: ghcr.io/mastodon/mastodon-streaming:v4.3.4 image: ghcr.io/mastodon/mastodon-streaming:v4.3.5
restart: always restart: always
env_file: .env.production env_file: .env.production
command: node ./streaming/index.js command: node ./streaming/index.js
@@ -100,8 +100,9 @@ services:
- redis - redis
sidekiq: sidekiq:
build: . # You can uncomment the following line if you want to not use the prebuilt image, for example if you have local code changes
image: ghcr.io/mastodon/mastodon:v4.3.4 # build: .
image: ghcr.io/mastodon/mastodon:v4.3.5
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
4 5
end end
def default_prerelease def default_prerelease

View File

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