Merge commit '6d2493ca7c39a5d60edd7109de0c24256f8fff8c' into glitch-soc/merge-upstream

This commit is contained in:
Claire committed 2025-09-25 18:44:23 +02:00
commit 4053209a05
61 files changed
+237 -234

No files matched your search

+4 -2
View File
@@ -194,8 +194,10 @@ export function submitCompose(successCallback) {
const status = getState().getIn(['compose', 'text'], '');
const media = getState().getIn(['compose', 'media_attachments']);
const statusId = getState().getIn(['compose', 'id'], null);
const hasQuote = !!getState().getIn(['compose', 'quoted_status_id']);
const spoiler_text = getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '';
if ((!status || !status.length) && media.size === 0) {
if (!(status?.length || media.size !== 0 || (hasQuote && spoiler_text?.length))) {
return;
}
@@ -227,11 +229,11 @@ export function submitCompose(successCallback) {
method: statusId === null ? 'post' : 'put',
data: {
status,
spoiler_text,
in_reply_to_id: getState().getIn(['compose', 'in_reply_to'], null),
media_ids: media.map(item => item.get('id')),
media_attributes,
sensitive: getState().getIn(['compose', 'sensitive']),
spoiler_text: getState().getIn(['compose', 'spoiler']) ? getState().getIn(['compose', 'spoiler_text'], '') : '',
visibility: visibility,
poll: getState().getIn(['compose', 'poll'], null),
language: getState().getIn(['compose', 'language']),