diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_spec.ts b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_spec.ts
index aa12dae759..396869cd8e 100644
--- a/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_spec.ts
+++ b/e2e-tests/cypress/tests/integration/channels/enterprise/guest_accounts/guest_invitation_ui_spec.ts
@@ -223,4 +223,15 @@ describe('Guest Account - Guest User Invitation Flow', () => {
// * Verify invite more button is present
cy.findByTestId('invite-more').should('be.visible');
});
+
+ it('hides the copy link button when inviting guests', () => {
+ // # Open team menu and click 'Invite People'
+ cy.uiOpenTeamMenu('Invite People');
+
+ // # Select Guest
+ cy.findByTestId('inviteGuestLink').should('be.visible').click();
+
+ // * The button "Copy invite link" should not exist
+ cy.findByTestId('InviteView__copyInviteLink').should('not.exist');
+ });
});
diff --git a/webapp/channels/src/components/invitation_modal/invite_view.scss b/webapp/channels/src/components/invitation_modal/invite_view.scss
index ec33fae3d5..b953080c26 100644
--- a/webapp/channels/src/components/invitation_modal/invite_view.scss
+++ b/webapp/channels/src/components/invitation_modal/invite_view.scss
@@ -51,6 +51,10 @@ button.InviteView__copyLink.tertiary-button:focus {
display: none;
}
+ &-guest {
+ justify-content: flex-end;
+ }
+
.btn {
font-weight: 600;
}
diff --git a/webapp/channels/src/components/invitation_modal/invite_view.tsx b/webapp/channels/src/components/invitation_modal/invite_view.tsx
index a67f53c9b5..9d6ec6292a 100644
--- a/webapp/channels/src/components/invitation_modal/invite_view.tsx
+++ b/webapp/channels/src/components/invitation_modal/invite_view.tsx
@@ -4,6 +4,7 @@
import React, {useEffect, useMemo} from 'react';
import {Modal} from 'react-bootstrap';
import {FormattedMessage, useIntl} from 'react-intl';
+import classNames from 'classnames';
import deepFreeze from 'mattermost-redux/utils/deep_freeze';
import {Channel} from '@mattermost/types/channels';
@@ -259,8 +260,8 @@ export default function InviteView(props: Props) {
)}
-
- {copyButton}
+
+ {props.inviteType === InviteType.MEMBER && copyButton}