Fixes custom status update (#5881)

This commit is contained in:
Shaz Amjad 2021-12-21 09:04:19 +11:00 committed by GitHub
parent b38db6bac6
commit 16d4231ccd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {