diff --git a/packages/client/src/components/panels/InvitePanel/sub-components/InviteInput.js b/packages/client/src/components/panels/InvitePanel/sub-components/InviteInput.js index 6b1245a8b0..c3fd59889f 100644 --- a/packages/client/src/components/panels/InvitePanel/sub-components/InviteInput.js +++ b/packages/client/src/components/panels/InvitePanel/sub-components/InviteInput.js @@ -309,6 +309,14 @@ const InviteInput = ({ }); } + if (isPaidUserLimit && item.isVisitor && isPaidUserRole(item.access)) { + const freeRole = getTopFreeRole(t, roomType)?.access; + + if (freeRole) { + item.access = freeRole; + toastr.error(); + } + } const items = removeExist([item, ...inviteItems]); setInviteItems(items); } @@ -370,7 +378,11 @@ const InviteInput = ({ }); } - if (isPaidUserLimit && !u.avatar && isPaidUserRole(u.access)) { + if ( + isPaidUserLimit && + (!u.avatar || u.isVisitor) && + isPaidUserRole(u.access) + ) { const freeRole = getTopFreeRole(t, roomType)?.access; if (freeRole) {