Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Fix the team server integration#738

Closed
dbkr wants to merge 2 commits into
developfrom
dbkr/fix_teamserver
Closed

Fix the team server integration#738
dbkr wants to merge 2 commits into
developfrom
dbkr/fix_teamserver

Conversation

@dbkr
Copy link
Copy Markdown
Member

@dbkr dbkr commented Mar 3, 2017

The UI auth refactor broke team server integration as it used variables from the register Signup class. Get that information (email sid & client secret) from the UI auth session.

I don't love the idea of passing the UI auth session around, I'm not really sure of a better way to do this though.

Requires matrix-org/matrix-js-sdk#383

dbkr added 2 commits March 3, 2017 16:24
Get HS / IS from the client, not the regidter logic which no
longer exists
Add callback so we can get at the UI auth object to extract the
email sid & client secret.
homeserverUrl: this.state.hsUrl,
identityServerUrl: this.state.isUrl,
accessToken: response.access_token,
});
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was the same thing as was done after the trackPromise: we should just do it then.

// is the client they initiated registration).
let trackPromise = q(null);
if (this._rtsClient) {
if (this._rtsClient && this._authLogic.getEmailSid()) {
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The referral tracking only makes sense if we registered with an email

}, teamToken);
}).then(() => {
return this._setupPushers();
}).done();
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The promise returned from this is not a q promise, and so does not have a .done, as it turns out. :/

// has been created. This allows the component to
// access more specific functions only available on
// the auth object itself.
onAuthObject: React.PropTypes.func,
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.

this is surely horrible. why not pass an opts object into the onAuthFinished callback with the emailSid and clientSecret?

@richvdh richvdh assigned dbkr and unassigned richvdh Mar 6, 2017
@dbkr
Copy link
Copy Markdown
Member Author

dbkr commented Mar 6, 2017

Have made another one that passes them in the onAuthFinished callback: #741

@dbkr dbkr closed this Mar 6, 2017
martindale pushed a commit to FabricLabs/matrix-react-sdk that referenced this pull request Dec 8, 2018
…/roomnamealias

Revert "room name should only take canonical alias into account"
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants