Skip to content

[NEW] Invite links: share a link to invite users#15933

Merged
rodrigok merged 20 commits intodevelopfrom
invite-links
Dec 22, 2019
Merged

[NEW] Invite links: share a link to invite users#15933
rodrigok merged 20 commits intodevelopfrom
invite-links

Conversation

@pierre-lehnen-rc
Copy link
Copy Markdown
Contributor

Closes #ISSUE_NUMBER

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Dec 6, 2019

This pull request introduces 1 alert when merging fa56ae0 into 003e135 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

@pierre-lehnen-rc pierre-lehnen-rc marked this pull request as ready for review December 13, 2019 08:07

const useDirectLink = settings.get('Accounts_Registration_InviteUrlType') === 'direct';
// Remove the last dash if present
const siteUrl = settings.get('Site_Url').replace(/\/$/g, '');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could use the getUrl method from here and create an extra option there redirectViaCloud that would populate the host param and will receive others via an object like redirectViCloudParams so we can reuse this logic.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this review?


const useDirectLink = settings.get('Accounts_Registration_InviteUrlType') === 'direct';
// Remove the last dash if present
const siteUrl = settings.get('Site_Url').replace(/\/$/g, '');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this review?


export const validateInviteToken = (token) => {
if (!token) {
throw new Meteor.Error('error-invalid-token', 'The invite token is invalid.', { method: 'validateInviteToken', field: 'token' });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, why no token is an exception and an invalid token is a false return? Aren't they all invalid?
I'd agree to never return false, always an exception or the {invite, room}.

@rodrigok
Copy link
Copy Markdown
Member

Can you translate to pt-BR as well?

@lgtm-com
Copy link
Copy Markdown

lgtm-com bot commented Dec 20, 2019

This pull request introduces 2 alerts when merging 31c5d60 into c558273 - view on LGTM.com

new alerts:

  • 2 for Unused variable, import, function or class

@rodrigok rodrigok changed the title [NEW] Invite Links [NEW] Invite links: share a link to invite users Dec 21, 2019
@rodrigok rodrigok added this to the 2.4.0 milestone Dec 21, 2019
@rodrigok rodrigok merged commit 33e67e4 into develop Dec 22, 2019
@rodrigok rodrigok deleted the invite-links branch December 22, 2019 21:32
gabriellsh added a commit that referenced this pull request Dec 23, 2019
…default-favorite-channels

* 'develop' of github.com:RocketChat/Rocket.Chat:
  Change version to 2.4.0
  Update NodeJS to 8.17.0 (#16043)
  [NEW] Invite links: share a link to invite users (#15933)
  Fix typo in Italian translation (#15998)
  Update Meteor 1.8.3 (#16037)
  [FIX] Importer: Variable name appearing instead of it's value (#16010)
  [IMPROVE] Replace livechat:inquiry publication by REST and Streamer (#15977)
  [IMPROVE] Sorting on livechat analytics queries were wrong (#16021)
  [IMPROVE] Replace fullUserData publication by REST (#15650)
  [IMPROVE] Replace integrations and integrationHistory publications by REST (#15885)
  Some performance improvements (#15886)
  [FIX]Add time format for latest message on the sidebar (#15930)
  [FIX] Admin Setting descriptions and Storybook (#15994)
  Bump version to 2.3.2
  [FIX] Invalid Redirect URI on Custom OAuth (#15957)
  [NEW] Livechat Widget version 1.3.0 (#15966)
@sampaiodiego sampaiodiego mentioned this pull request Dec 26, 2019
2 tasks
@ruKurz
Copy link
Copy Markdown
Contributor

ruKurz commented Feb 5, 2020

Hi, is there any documentation about this feature? How does it look like and how do I use this it? Are there any parameters configureable (e.g. the expiration time for the link)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants