Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: #35379 , made it is so an error message would be displayed when user sets custom status as an empty string #35380

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apps/meteor/client/sidebar/header/EditStatusModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ const EditStatusModal = ({ onClose, userStatus, userStatusText }: EditStatusModa

const handleSaveStatus = useCallback(async () => {
try {
if (statusText && statusText.trim() === '') {
dispatchToastMessage({ type: 'error', message: t('StatusMessage_Cannot_Be_Empty') });
return;
}

await setUserStatus({ message: statusText, status: statusType });
setCustomStatus(statusText);
dispatchToastMessage({ type: 'success', message: t('StatusMessage_Changed_Successfully') });
Expand Down
1 change: 1 addition & 0 deletions packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -5308,6 +5308,7 @@
"StatusMessage": "Status message",
"StatusMessage_Change_Disabled": "Your Rocket.Chat administrator has disabled the changing of status messages",
"StatusMessage_Changed_Successfully": "Status message changed successfully.",
"StatusMessage_Cannot_Be_Empty": "Custom status message cannot be empty",
"StatusMessage_Placeholder": "What are you doing right now?",
"StatusMessage_Too_Long": "Status message must be shorter than 120 characters.",
"Step": "Step",
Expand Down