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

[NEW] Federation #12370

Merged
merged 75 commits into from
Mar 6, 2019
Merged

[NEW] Federation #12370

merged 75 commits into from
Mar 6, 2019

Conversation

alansikora
Copy link
Contributor

@alansikora alansikora commented Oct 19, 2018

This is an early implementation of Rocket.Chat's federation feature.

This adds a new layer of events that handles the communication between two or more peers.

@alansikora alansikora self-assigned this Oct 19, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-12370 October 19, 2018 12:20 Inactive
package.json Outdated Show resolved Hide resolved
@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-12370 February 28, 2019 12:30 Inactive
@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-12370 February 28, 2019 12:57 Inactive
@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-12370 February 28, 2019 21:22 Inactive
@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-12370 March 1, 2019 01:58 Inactive
} catch (error) {
nameValidation = new RegExp('^[0-9a-zA-Z-_.]+$');

if (options.nameValidationRegex) {
Copy link
Member

Choose a reason for hiding this comment

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

what happens if nameValidation = new RegExp(options.nameValidationRegex); throws an error?

my suggestion:

	try {
			nameValidation = new RegExp(`^${ options.nameValidationRegex || settings.get('UTF8_Names_Validation') }$`)

		} catch (error) {
			nameValidation = new RegExp('^[0-9a-zA-Z-_.]+$');
		}
	}

@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-12370 March 1, 2019 19:02 Inactive
@sampaiodiego sampaiodiego merged commit a080cd9 into develop Mar 6, 2019
@sampaiodiego sampaiodiego deleted the rkt-federation branch March 6, 2019 13:54
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
@grahhnt
Copy link
Contributor

grahhnt commented May 15, 2019

When will the hub software be available? I would like to run the hub software separate from the official one. Thanks!

@geekgonecrazy
Copy link
Contributor

I’m not sure what the plans are there. Curious though why you want to run your own hub?

@grahhnt
Copy link
Contributor

grahhnt commented May 17, 2019

@geekgonecrazy i would like to allow certain aspects of my community to be pulled out and put under their own administration. I would like to have like foo.mycommunity.net and bar.mycommunity.net to share accounts (so people wouldn't have to create separate accounts) and be able to easily communicate.

This is possible with the iframe API, having a callback to the "master" instance, but it isn't as streamlined as I would like it to be. Having the federation system would allow this to work a lot better.

@geekgonecrazy
Copy link
Contributor

geekgonecrazy commented May 17, 2019

Interesting. If it’s just about user accounts can do a central authentication source like oauth. Could actually setup one as oauth server.

Just to be clear. Federation is letting users on foo.mycommunity.com to talk to users on bar.mycommunity.com

Users from foo.mycommunity.com won’t actually be able to login to bar.mycommunity.com.

They would stay on their own server and simply join rooms/talk to people on the other server.

@MIKI785
Copy link
Contributor

MIKI785 commented May 17, 2019

@geekgonecrazy This is something I would find useful as well. As we have multiple locations with separate RC instances, this would allow these locations to be connected together without going through the public federation. We don't need shared accounts, just to be able to comunnicate across the instances.

@grahhnt
Copy link
Contributor

grahhnt commented May 17, 2019

@geekgonecrazy yeah it would just allow people to have the ability to communicate between instances without creating a new account and having to have 2 browser tabs open.

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

Successfully merging this pull request may close these issues.

7 participants