Skip to content

Commit f0defae

Browse files
authored
Merge pull request #1059 from kmycode/upstream-20251015
Upstream 20251015
2 parents 9895be2 + e7dcaf2 commit f0defae

File tree

425 files changed

+2069
-1688
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+2069
-1688
lines changed

.storybook/preview.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,23 @@ const preview: Preview = {
5050
locale: 'en',
5151
},
5252
decorators: [
53-
(Story, { parameters, globals }) => {
53+
(Story, { parameters, globals, args }) => {
54+
// Get the locale from the global toolbar
55+
// and merge it with any parameters or args state.
5456
const { locale } = globals as { locale: string };
5557
const { state = {} } = parameters;
58+
const { state: argsState = {} } = args;
59+
5660
const reducer = reducerWithInitialState(
5761
{
5862
meta: {
5963
locale,
6064
},
6165
},
6266
state as Record<string, unknown>,
67+
argsState as Record<string, unknown>,
6368
);
69+
6470
const store = configureStore({
6571
reducer,
6672
middleware(getDefaultMiddleware) {

CHANGELOG.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,88 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [4.5.0] - UNRELEASED
6+
7+
### Added
8+
9+
- **Add support for allowing and authoring quotes** (#35355, #35578, #35614, #35618, #35624, #35626, #35652, #35629, #35665, #35653, #35670, #35677, #35690, #35697, #35689, #35699, #35700, #35701, #35709, #35714, #35713, #35715, #35725, #35749, #35769, #35780, #35762, #35804, #35808, #35805, #35819, #35824, #35828, #35822, #35835, #35865, #35860, #35832, #35891, #35894, #35895, #35820, #35917, #35924, #35925, #35914, #35930, #35941, #35939, #35948, #35955, #35967, #35990, #35991, #35975, #35971, #36002, #35986, #36031, #36034, #36038, #36054, #36052, #36055, #36065, #36068, #36083, #36087, #36080, #36091, #36090, #36118, #36119, #36128, #36094, #36129, #36138, #36132, #36151, #36158, #36171, #36194, #36220, #36169, #36130, #36249, #36153, #36299, #36291, #36301, #36315, #36317, #36364, #36383, #36381, #36459, #36464, and #36461 by @ChaosExAnima, @ClearlyClaire, @Lycolia, @diondiondion, and @tribela)\
10+
This includes a revamp of the composer interface.\
11+
See https://blog.joinmastodon.org/2025/09/introducing-quote-posts/ for a user-centric overview of the feature, and https://docs.joinmastodon.org/client/quotes/ for API documentation.
12+
- **Add support for fetching and refreshing replies to the web UI** (#35210, #35496, #35575, #35500, #35577, #35602, #35603, #35654, #36141, #36237, #36172, #36256, #36271, #36334, #36382, and #36239 by @ClearlyClaire, @Gargron, and @diondiondion)
13+
- **Add ability to block words in usernames** (#35407, #35655, and #35806 by @ClearlyClaire and @Gargron)
14+
- Add support for displaying link previews for Admin UI (#35958 by @ThisIsMissEm)
15+
- Add support for dynamic viewport height (#36272 by @e1berd)
16+
- Add support for numeric-based URIs for new local accounts (#32724, #36304, #36316, and #36365 by @ClearlyClaire)
17+
- Add Traditional Mongolian to posting languages (#36196 by @shimon1024)
18+
- Add example post with manual quote approval policy to `dev:populate_sample_data` (#36099 by @ClearlyClaire)
19+
- Add server-side support for handling posts with a quote policy allowing followers to quote (#36093 and #36127 by @ClearlyClaire)
20+
- Add schema.org markup to SEO-enabled posts (#36075 by @Gargron)
21+
- Add migration to fill unset default quote policy based on default post privacy (#36041 by @ClearlyClaire)
22+
- Add support for exposing conversation context for new public conversations according to FEP-7888 (#35959 and #36064 by @ClearlyClaire and @jesseplusplus)
23+
- Add digest re-check before removing followers in synchronization mechanism (#34273 by @ClearlyClaire)
24+
- Add “Posting defaults” setting page, moving existing settings from “Other” (#35896, #36033, #35966, #35969, and #36084 by @ClearlyClaire and @diondiondion)
25+
- Add support for displaying Valkey version on admin dashboard (#35785 by @ykzts)
26+
- Add delivery failure tracking and handling to FASP jobs (#35625, #35628, and #35723 by @oneiros)
27+
- Add example of quote post with a preview card to development sample data (#35616 by @ClearlyClaire)
28+
- Add second set of blocked text that applies to accounts regardless of account age for spam-blocking (#35563 by @ClearlyClaire)
29+
- Add experimental feature to select custom emoji rendering (#35229, #35282, #35253, #35424, #35473, #35483, #35505, #35568, #35605, #35659, #35664, #35739, #35985, #36051, #36071, #36137, #36165, #36248, #36262, #36275, #36293, #36341, #36342, #36366, #36377, #36378, #36385, #36393, #36397, #36403, #36413, #36410, #36454, and #36402 by @ChaosExAnima and @braddunbar)\
30+
This also completely reworks the processing and rendering of emojis and server-rendered HTML in statuses and other places.
31+
32+
### Changed
33+
34+
- Change confirmation dialogs for follow button actions “unfollow”, “unblock”, and “withdraw request” (#36289 by @diondiondion)
35+
- Change “Follow” button labels (#36264 by @diondiondion)
36+
- Change display of content warnings in Admin UI (#35935 by @ThisIsMissEm)
37+
- Change index on `follows` table to improve performance of some queries (#36374 by @ClearlyClaire)
38+
- Change links to accounts in settings and moderation views to link to local view unless account is suspended (#36340 by @diondiondion)
39+
- Change redirection for denied registration from web app to sign-in page with error message (#36384 by @ClearlyClaire)
40+
- Change `timeline_preview` setting into four more granular settings (#36338 and #36467 by @ClearlyClaire)
41+
- Change wording and design of interaction dialog to simplify it (#36124 by @diondiondion)
42+
- Change dropdown menus to allow disabled items to be focused (#36078 by @diondiondion)
43+
- Change modal background colours in light mode (#36069 by @diondiondion)
44+
- Change “Posting defaults” settings page to enforce `nobody` quote policy for `private` default visibility (#36040 by @ClearlyClaire)
45+
- Change description of “Quiet public” (#36032 by @ClearlyClaire)
46+
- Change “Boost with original visibility” to “Share again with your followers” (#36035 by @ClearlyClaire)
47+
- Change handling of push subscriptions to automatically delete invalid ones on delivery (#35987 by @ThisIsMissEm)
48+
- Change design of quote posts in web UI (#35584 and #35834 by @ClearlyClaire and @Gargron)
49+
- Change auditable accounts to be sorted by username in admin action logs interface (#35272 by @breadtk)
50+
- Change order of translation restoration and service credit on post card (#33619 by @colindean)
51+
- Change position of ‘add more’ to be inside table toolbar on reports (#35963 by @ThisIsMissEm)
52+
53+
### Fixed
54+
55+
- Fix rendering of poll options in status history modal (#35633 by @ThisIsMissEm)
56+
- Fix “mute” button being displayed to unauthenticated visitors in hashtag dropdown (#36353 by @mkljczk)
57+
- Fix overflow handling of `.more-from-author` (#36310 by @edent)
58+
- Fix unfortunate action button wrapping in admin area (#36247 by @diondiondion)
59+
- Fix translate button width in Safari (#36164 and #36216 by @diondiondion)
60+
- Fix login page linking to other pages within OAuth authorization flow (#36115 by @Gargron)
61+
- Fix stale search results being displayed in Web UI while new query is in progress (#36053 by @ChaosExAnima)
62+
- Fix YouTube iframe not being able to start at a defined time (#26584 by @BrunoViveiros)
63+
- Fix banned text being able to be circumvented via unicode (#35978 by @Gargron)
64+
- Fix batch table toolbar displaying under status media (#35962 by @ThisIsMissEm)
65+
- Fix incorrect RSS feed MIME type in gzip_types directive (#35562 by @iioflow)
66+
- Fix 404 error after deleting status from detail view (#35800) (#35881 by @crafkaz)
67+
- Fix feeds keyboard navigation issues (#35853, #35864, and #36267 by @braddunbar and @diondiondion)
68+
- Fix layout shift caused by “Who to follow” widget (#35861 by @diondiondion)
69+
- Fix Vagrantfile (#35765 by @ClearlyClaire)
70+
- Fix reply indicator displaying wrong avatar in rare cases (#35756 by @ClearlyClaire)
71+
- Fix `Chewy::UndefinedUpdateStrategy` in `dev:populate_sample_data` task when Elasticsearch is enabled (#35615 by @ClearlyClaire)
72+
- Fix unnecessary account note addition for already-muted moved-to users (#35566 by @mjankowski)
73+
- Fix seeded admin user creation failing on specific configurations (#35565 by @oneiros)
74+
- Fix media modal images in Web UI having redundant `title` attribute (#35468 by @mayank99)
75+
- Fix inconsistent default privacy post setting when unset in settings (#35422 by @oneiros)
76+
- Fix glitchy status keyboard navigation (#35455 and #35504 by @diondiondion)
77+
- Fix post being submitted when pressing “Enter” in the CW field (#35445 by @diondiondion)
78+
79+
## [4.4.7] - 2025-10-15
80+
81+
### Fixed
82+
83+
- Fix forwarder being called with `nil` status when quote post is soft-deleted (#36463 by @ClearlyClaire)
84+
- Fix moderation warning e-mails that include posts (#36462 by @ClearlyClaire)
85+
- Fix allow_referrer_origin typo (#36460 by @ShadowJonathan)
86+
587
## [4.4.6] - 2025-10-13
688

789
### Security

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ FROM build AS ffmpeg
208208
# renovate: datasource=repology depName=ffmpeg packageName=openpkg_current/ffmpeg
209209
ARG FFMPEG_VERSION=8.0
210210
# ffmpeg download URL, change with [--build-arg FFMPEG_URL="https://ffmpeg.org/releases"]
211-
ARG FFMPEG_URL=https://ffmpeg.org/releases
211+
ARG FFMPEG_URL=https://github.com/FFmpeg/FFmpeg/archive/refs/tags
212212

213213
WORKDIR /usr/local/ffmpeg/src
214214
# Download and extract ffmpeg source code
215-
ADD ${FFMPEG_URL}/ffmpeg-${FFMPEG_VERSION}.tar.xz /usr/local/ffmpeg/src/
216-
RUN tar xf ffmpeg-${FFMPEG_VERSION}.tar.xz;
215+
ADD ${FFMPEG_URL}/n${FFMPEG_VERSION}.tar.gz /usr/local/ffmpeg/src/
216+
RUN tar xf n${FFMPEG_VERSION}.tar.gz && mv FFmpeg-n${FFMPEG_VERSION} ffmpeg-${FFMPEG_VERSION};
217217

218218
WORKDIR /usr/local/ffmpeg/src/ffmpeg-${FFMPEG_VERSION}
219219

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ gem 'prometheus_exporter', '~> 2.2', require: false
105105
gem 'opentelemetry-api', '~> 1.7.0'
106106

107107
group :opentelemetry do
108-
gem 'opentelemetry-exporter-otlp', '~> 0.30.0', require: false
108+
gem 'opentelemetry-exporter-otlp', '~> 0.31.0', require: false
109109
gem 'opentelemetry-instrumentation-active_job', '~> 0.9.0', require: false
110110
gem 'opentelemetry-instrumentation-active_model_serializers', '~> 0.23.0', require: false
111111
gem 'opentelemetry-instrumentation-concurrent_ruby', '~> 0.23.0', require: false

Gemfile.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ GEM
121121
erubi (>= 1.0.0)
122122
rack (>= 0.9.0)
123123
rouge (>= 1.0.0)
124-
bigdecimal (3.2.3)
124+
bigdecimal (3.3.1)
125125
bindata (2.5.1)
126126
binding_of_caller (1.0.1)
127127
debug_inspector (>= 1.2.0)
@@ -277,7 +277,7 @@ GEM
277277
google-protobuf (4.32.1)
278278
bigdecimal
279279
rake (>= 13)
280-
googleapis-common-protos-types (1.21.0)
280+
googleapis-common-protos-types (1.22.0)
281281
google-protobuf (~> 4.26)
282282
haml (6.3.0)
283283
temple (>= 0.8.2)
@@ -502,9 +502,9 @@ GEM
502502
openssl-signature_algorithm (1.3.0)
503503
openssl (> 2.0)
504504
opentelemetry-api (1.7.0)
505-
opentelemetry-common (0.22.0)
505+
opentelemetry-common (0.23.0)
506506
opentelemetry-api (~> 1.0)
507-
opentelemetry-exporter-otlp (0.30.0)
507+
opentelemetry-exporter-otlp (0.31.0)
508508
google-protobuf (>= 3.18)
509509
googleapis-common-protos-types (~> 1.3)
510510
opentelemetry-api (~> 1.1)
@@ -568,7 +568,7 @@ GEM
568568
opentelemetry-instrumentation-base (~> 0.24)
569569
opentelemetry-registry (0.4.0)
570570
opentelemetry-api (~> 1.1)
571-
opentelemetry-sdk (1.9.0)
571+
opentelemetry-sdk (1.10.0)
572572
opentelemetry-api (~> 1.1)
573573
opentelemetry-common (~> 0.20)
574574
opentelemetry-registry (~> 0.2)
@@ -603,7 +603,7 @@ GEM
603603
net-smtp
604604
premailer (~> 1.7, >= 1.7.9)
605605
prettyprint (0.2.0)
606-
prism (1.5.1)
606+
prism (1.5.2)
607607
prometheus_exporter (2.3.0)
608608
webrick
609609
propshaft (1.3.1)
@@ -614,14 +614,14 @@ GEM
614614
date
615615
stringio
616616
public_suffix (6.0.2)
617-
puma (7.0.4)
617+
puma (7.1.0)
618618
nio4r (~> 2.0)
619619
pundit (2.5.2)
620620
activesupport (>= 3.0.0)
621621
raabro (1.4.0)
622622
racc (1.8.1)
623623
rack (3.2.3)
624-
rack-attack (6.7.0)
624+
rack-attack (6.8.0)
625625
rack (>= 1.0, < 4)
626626
rack-cors (3.0.0)
627627
logger
@@ -764,10 +764,10 @@ GEM
764764
rubocop-i18n (3.2.3)
765765
lint_roller (~> 1.1)
766766
rubocop (>= 1.72.1)
767-
rubocop-performance (1.26.0)
767+
rubocop-performance (1.26.1)
768768
lint_roller (~> 1.1)
769769
rubocop (>= 1.75.0, < 2.0)
770-
rubocop-ast (>= 1.44.0, < 2.0)
770+
rubocop-ast (>= 1.47.1, < 2.0)
771771
rubocop-rails (2.33.4)
772772
activesupport (>= 4.2.0)
773773
lint_roller (~> 1.1)
@@ -790,7 +790,7 @@ GEM
790790
ruby-vips (2.2.5)
791791
ffi (~> 1.12)
792792
logger
793-
rubyzip (3.1.1)
793+
rubyzip (3.2.0)
794794
rufus-scheduler (3.9.2)
795795
fugit (~> 1.1, >= 1.11.1)
796796
safety_net_attestation (0.5.0)
@@ -837,7 +837,7 @@ GEM
837837
stoplight (5.3.8)
838838
zeitwerk
839839
stringio (3.1.7)
840-
strong_migrations (2.5.0)
840+
strong_migrations (2.5.1)
841841
activerecord (>= 7.1)
842842
swd (2.0.3)
843843
activesupport (>= 3)
@@ -1008,7 +1008,7 @@ DEPENDENCIES
10081008
omniauth-saml (~> 2.0)
10091009
omniauth_openid_connect (~> 0.8.0)
10101010
opentelemetry-api (~> 1.7.0)
1011-
opentelemetry-exporter-otlp (~> 0.30.0)
1011+
opentelemetry-exporter-otlp (~> 0.31.0)
10121012
opentelemetry-instrumentation-active_job (~> 0.9.0)
10131013
opentelemetry-instrumentation-active_model_serializers (~> 0.23.0)
10141014
opentelemetry-instrumentation-concurrent_ruby (~> 0.23.0)

app/controllers/auth/registrations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def after_update_path_for(_resource)
8989
end
9090

9191
def check_enabled_registrations
92-
redirect_to root_path unless allowed_registration?(request.remote_ip, @invite)
92+
redirect_to new_user_session_path, alert: I18n.t('devise.failure.closed_registrations', email: Setting.site_contact_email) unless allowed_registration?(request.remote_ip, @invite)
9393
end
9494

9595
def invite_code

app/helpers/application_helper.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ def conditional_link_to(condition, name, options = {}, html_options = {}, &block
115115
end
116116

117117
def material_symbol(icon, attributes = {})
118+
whitespace = attributes.delete(:whitespace) { true }
118119
safe_join(
119120
[
120121
inline_svg_tag(
@@ -123,7 +124,7 @@ def material_symbol(icon, attributes = {})
123124
role: :img,
124125
data: attributes[:data]
125126
),
126-
' ',
127+
whitespace ? ' ' : '',
127128
]
128129
)
129130
end

app/helpers/statuses_helper.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ def poll_summary(status)
4949
status.preloadable_poll.options.map { |o| "[ ] #{o}" }.join("\n")
5050
end
5151

52+
def status_classnames(status, is_quote)
53+
if is_quote
54+
'status--is-quote'
55+
elsif status.quote.present?
56+
'status--has-quote'
57+
end
58+
end
59+
5260
def status_description(status)
5361
components = [[media_summary(status), status_text_summary(status)].compact_blank.join(' · ')]
5462

app/javascript/mastodon/actions/compose_typed.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ import { importFetchedStatuses } from './importer';
2121
import { openModal } from './modal';
2222

2323
const messages = defineMessages({
24+
quoteErrorEdit: {
25+
id: 'quote_error.edit',
26+
defaultMessage: 'Quotes cannot be added when editing a post.',
27+
},
2428
quoteErrorUpload: {
2529
id: 'quote_error.upload',
2630
defaultMessage: 'Quoting is not allowed with media attachments.',
@@ -123,8 +127,8 @@ export const quoteComposeByStatus = createAppThunk(
123127
false,
124128
);
125129

126-
if (composeState.get('is_uploading')) {
127-
dispatch(showAlert({ message: messages.quoteErrorUpload }));
130+
if (composeState.get('id')) {
131+
dispatch(showAlert({ message: messages.quoteErrorEdit }));
128132
} else if (composeState.get('quoted_status_id')) {
129133
dispatch(showAlert({ message: messages.quoteErrorQuote }));
130134
} else if (
@@ -174,7 +178,8 @@ export const pasteLinkCompose = createDataLoadingThunk(
174178
composeState.get('quoted_status_id') ||
175179
composeState.get('is_submitting') ||
176180
composeState.get('poll') ||
177-
composeState.get('is_uploading')
181+
composeState.get('is_uploading') ||
182+
composeState.get('id')
178183
)
179184
return;
180185

app/javascript/mastodon/components/emoji/context.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const AnimateEmojiProvider = polymorphicForwardRef<
6363

6464
// If there's a parent context or GIFs autoplay, we don't need handlers.
6565
const parentContext = useContext(AnimateEmojiContext);
66-
if (parentContext !== null || autoPlayGif === true) {
66+
if (parentContext !== null) {
6767
return (
6868
<Wrapper
6969
{...props}

0 commit comments

Comments
 (0)