From 14108d2c061d83d156246787cefb37cab7d3e890 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 24 Jul 2026 16:46:00 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Fix=20=E2=80=9CHide=20media=20with=20a=20wa?= =?UTF-8?q?rning=E2=80=9D=20filters=20not=20being=20applied=20correctly=20?= =?UTF-8?q?(#39946)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/mastodon/selectors/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/mastodon/selectors/index.js b/app/javascript/mastodon/selectors/index.js index 166c3e3e3a..3c02db0836 100644 --- a/app/javascript/mastodon/selectors/index.js +++ b/app/javascript/mastodon/selectors/index.js @@ -75,8 +75,8 @@ function getStatusResultFunction( status: statusBase.withMutations(map => { map.set('reblog', statusReblog); map.set('account', accountBase); - map.set('matched_filters', filtered); - map.set('matched_media_filters', mediaFiltered); + map.set('matched_filters', filtered ? filtered.toJS() : false); + map.set('matched_media_filters', mediaFiltered ? mediaFiltered.toJS() : false); }), loadingState: statusBase.get('isLoading') ? 'loading' : 'complete' }; From 9e5f298350d9b05dbb60ba122cd8cb72d40c8997 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 27 Jul 2026 11:46:27 +0200 Subject: [PATCH 2/4] Fix being unable to vote in polls without an expiration date (#39949) --- app/javascript/mastodon/api_types/polls.ts | 2 +- app/javascript/mastodon/components/poll.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/mastodon/api_types/polls.ts b/app/javascript/mastodon/api_types/polls.ts index 891a2faba7..1ff2a6a5cb 100644 --- a/app/javascript/mastodon/api_types/polls.ts +++ b/app/javascript/mastodon/api_types/polls.ts @@ -9,7 +9,7 @@ export interface ApiPollOptionJSON { export interface ApiPollJSON { id: string; - expires_at: string; + expires_at: string | null; expired: boolean; multiple: boolean; votes_count: number; diff --git a/app/javascript/mastodon/components/poll.tsx b/app/javascript/mastodon/components/poll.tsx index c77ce8bcee..443022c003 100644 --- a/app/javascript/mastodon/components/poll.tsx +++ b/app/javascript/mastodon/components/poll.tsx @@ -36,7 +36,7 @@ const messages = defineMessages({ }); const isPollExpired = (expiresAt: Model.Poll['expires_at']) => - new Date(expiresAt).getTime() < Date.now(); + expiresAt !== null && new Date(expiresAt).getTime() < Date.now(); interface PollProps { pollId: string; @@ -64,7 +64,7 @@ export const Poll: React.FC = ({ pollId, disabled, status }) => { return poll.expired || isPollExpired(poll.expires_at); }, [poll]); const timeRemaining = useMemo(() => { - if (!poll) { + if (!poll?.expires_at) { return null; } if (expired) { From 9b51e5af2b8d8e05caeb64bc980c2129bb08b217 Mon Sep 17 00:00:00 2001 From: Claire Date: Fri, 24 Jul 2026 16:46:00 +0200 Subject: [PATCH 3/4] =?UTF-8?q?[Glitch]=20Fix=20=E2=80=9CHide=20media=20wi?= =?UTF-8?q?th=20a=20warning=E2=80=9D=20filters=20not=20being=20applied=20c?= =?UTF-8?q?orrectly?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Port 1553ca26f27af816885970a02b2bf69b64748e46 to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/selectors/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/flavours/glitch/selectors/index.js b/app/javascript/flavours/glitch/selectors/index.js index 770aef7f98..e17d38c1da 100644 --- a/app/javascript/flavours/glitch/selectors/index.js +++ b/app/javascript/flavours/glitch/selectors/index.js @@ -76,8 +76,8 @@ function getStatusResultFunction( status: statusBase.withMutations(map => { map.set('reblog', statusReblog); map.set('account', accountBase); - map.set('matched_filters', filtered); - map.set('matched_media_filters', mediaFiltered); + map.set('matched_filters', filtered ? filtered.toJS() : false); + map.set('matched_media_filters', mediaFiltered ? mediaFiltered.toJS() : false); }), loadingState: statusBase.get('isLoading') ? 'loading' : 'complete' }; From 66ccc19509253b090dd099bf5eb396e847e3e172 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 27 Jul 2026 11:46:27 +0200 Subject: [PATCH 4/4] [Glitch] Fix being unable to vote in polls without an expiration date Port 42c01d703fdb87abd8c335624b83f2ac251967ac to glitch-soc Signed-off-by: Claire --- app/javascript/flavours/glitch/api_types/polls.ts | 2 +- app/javascript/flavours/glitch/components/poll.tsx | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/javascript/flavours/glitch/api_types/polls.ts b/app/javascript/flavours/glitch/api_types/polls.ts index 891a2faba7..1ff2a6a5cb 100644 --- a/app/javascript/flavours/glitch/api_types/polls.ts +++ b/app/javascript/flavours/glitch/api_types/polls.ts @@ -9,7 +9,7 @@ export interface ApiPollOptionJSON { export interface ApiPollJSON { id: string; - expires_at: string; + expires_at: string | null; expired: boolean; multiple: boolean; votes_count: number; diff --git a/app/javascript/flavours/glitch/components/poll.tsx b/app/javascript/flavours/glitch/components/poll.tsx index cfcaa5c2ad..c1404f4100 100644 --- a/app/javascript/flavours/glitch/components/poll.tsx +++ b/app/javascript/flavours/glitch/components/poll.tsx @@ -36,7 +36,7 @@ const messages = defineMessages({ }); const isPollExpired = (expiresAt: Model.Poll['expires_at']) => - new Date(expiresAt).getTime() < Date.now(); + expiresAt !== null && new Date(expiresAt).getTime() < Date.now(); interface PollProps { pollId: string; @@ -64,7 +64,7 @@ export const Poll: React.FC = ({ pollId, disabled, status }) => { return poll.expired || isPollExpired(poll.expires_at); }, [poll]); const timeRemaining = useMemo(() => { - if (!poll) { + if (!poll?.expires_at) { return null; } if (expired) {