Skip to content
Merged
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
6 changes: 6 additions & 0 deletions .changeset/late-impalas-battle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@rocket.chat/i18n': patch
'@rocket.chat/meteor': patch
---

Changes the feedback message when inviting external users to a federated channel
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ const AddUsers = ({ rid, onClickBack, reload }: AddUsersProps): ReactElement =>
const dispatchToastMessage = useToastMessageDispatch();
const room = useRoom();
const usersFieldId = useId();
const roomIsFederated = isRoomFederated(room);
// we are dropping the non native federation for now
const isFederationBlocked = room && !isRoomNativeFederated(room);

const { closeTab } = useRoomToolbox();
const saveAction = useMethod('addUsersToRoom');
Expand All @@ -50,7 +53,7 @@ const AddUsers = ({ rid, onClickBack, reload }: AddUsersProps): ReactElement =>
const handleSave = useEffectEvent(async ({ users }: { users: string[] }) => {
try {
await saveAction({ rid, users });
dispatchToastMessage({ type: 'success', message: t('Users_added') });
dispatchToastMessage({ type: 'success', message: t(roomIsFederated && !isFederationBlocked ? 'Users_invited' : 'Users_added') });
onClickBack();
reload();
} catch (error) {
Expand All @@ -60,10 +63,6 @@ const AddUsers = ({ rid, onClickBack, reload }: AddUsersProps): ReactElement =>

const addClickHandler = useAddMatrixUsers();

const roomIsFederated = isRoomFederated(room);
// we are dropping the non native federation for now
const isFederationBlocked = room && !isRoomNativeFederated(room);

return (
<ContextualbarDialog>
<ContextualbarHeader>
Expand Down
3 changes: 2 additions & 1 deletion packages/i18n/src/locales/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -7059,5 +7059,6 @@
"You_cannot_add_external_users_to_non_federated_room": "You cannot add external users to a non-federated room",
"VERIFIED": "User is verified",
"UNVERIFIED": "User is unverified",
"UNABLE_TO_VERIFY": "Unable to verify user"
"UNABLE_TO_VERIFY": "Unable to verify user",
"Users_invited": "The users have been invited"
}
Loading