From 16d4231ccd83b9d2e98d1fefe41885ac281b74ae Mon Sep 17 00:00:00 2001 From: Shaz Amjad Date: Tue, 21 Dec 2021 09:04:19 +1100 Subject: [PATCH] Fixes custom status update (#5881) --- app/actions/views/custom_status.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/actions/views/custom_status.ts b/app/actions/views/custom_status.ts index 97f12d845..b7c3e4e67 100644 --- a/app/actions/views/custom_status.ts +++ b/app/actions/views/custom_status.ts @@ -19,6 +19,11 @@ export function setCustomStatus(customStatus: UserCustomStatus): ActionFunc { user.props.customStatus = JSON.stringify(customStatus); dispatch({type: UserTypes.RECEIVED_ME, data: user}); + // Server does not like empty 'expires_at' string. + if (!customStatus.expires_at) { + delete customStatus.expires_at; + } + try { await Client4.updateCustomStatus(customStatus); } catch (error) {