diff --git a/lib/shared/messages/change-settings-message-spec.js b/lib/shared/messages/change-settings-message-spec.js --- a/lib/shared/messages/change-settings-message-spec.js +++ b/lib/shared/messages/change-settings-message-spec.js @@ -127,7 +127,12 @@ params: RobotextParams, ): string { let value; - if ( + if (!messageInfo.value.toString()) { + return `${creator} cleared ${params.encodedThreadEntity( + messageInfo.threadID, + 'the thread', + )}'s ${messageInfo.field}`; + } else if ( messageInfo.field === 'color' && messageInfo.value.toString().match(validHexColorRegex) ) { @@ -142,11 +147,10 @@ } else { value = messageInfo.value; } - return ( - `${creator} updated ` + - `${params.encodedThreadEntity(messageInfo.threadID, 'the thread')}'s ` + - `${messageInfo.field} to "${value}"` - ); + return `${creator} updated ${params.encodedThreadEntity( + messageInfo.threadID, + 'the thread', + )}'s ${messageInfo.field} to "${value}"`; }, notificationTexts( diff --git a/web/modals/threads/settings/thread-settings-general-tab.react.js b/web/modals/threads/settings/thread-settings-general-tab.react.js --- a/web/modals/threads/settings/thread-settings-general-tab.react.js +++ b/web/modals/threads/settings/thread-settings-general-tab.react.js @@ -1,6 +1,7 @@ // @flow import * as React from 'react'; +import tinycolor from 'tinycolor2'; import { changeThreadSettingsActionTypes, @@ -89,7 +90,7 @@ setQueuedChanges(prevQueuedChanges => Object.freeze({ ...prevQueuedChanges, - color: color !== threadInfo.color ? color : undefined, + color: !tinycolor.equals(color, threadInfo.color) ? color : undefined, }), ); },