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

Support room dir 3rd party network filtering #2747

Merged
merged 5 commits into from Dec 15, 2016

Conversation

@dbkr
Copy link
Member

dbkr commented Dec 14, 2016

As per matrix-org/synapse#1676

The existing local config system still exists and is used for
remote home server directories (since /thirdparty/protocols
doesn't support listing remote home servers, and also because
people are using it).

As per matrix-org/synapse#1676

The existing local config system still exists and is used for
remote home server directories (since /thirdparty/protocols
doesn't support listing remote home servers, and also because
people are using it).
@erikjohnston

This comment has been minimized.

Copy link
Member

erikjohnston commented Dec 14, 2016

Looks like you're hitting the right APIs.

@erikjohnston erikjohnston removed their assignment Dec 14, 2016
Copy link
Member

richvdh left a comment

Looks like javascript to me. I struggle to get my head around this code. Not being able to use half of it on my own HS doesn't help.

Probably fine, a couple of nits

}
}

return options;
}

_makeMenuOptionFromProtocolInstance(server, protocol, instance, wire_onclick) {

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 14, 2016

Member

is wire_onclick ever false? why is it called that anyway?

This comment has been minimized.

Copy link
@dbkr

dbkr Dec 15, 2016

Author Member

Yeah, as we only want to wire the onclick handler when it's used as a selectable menu option, rather than the currently selected menu option (ie. in the unexpanded dropdown).

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 15, 2016

Member

right, but it doesn't seem to be set in either of the places it's called.

and oh, wire is a verb. How about handleClicks or something? (don't we do camelCase rather than underscores?)

or just have an onProtocolInstanceClicked parameter, and pass in this.onMenuOptionClickProtocolInstance or null.

@@ -202,6 +253,24 @@ export default class NetworkDropdown extends React.Component {
</div>;
}

protocolNameForInstanceId(instance_id) {

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 14, 2016

Member

needs _ if it's private

This comment has been minimized.

Copy link
@dbkr

dbkr Dec 15, 2016

Author Member

Done

@@ -131,6 +131,11 @@ module.exports = React.createClass({
if (my_server != MatrixClientPeg.getHomeServerName()) {
opts.server = my_server;
}
if (this.state.instance_id) {

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 14, 2016

Member

add instance_id to getInitialState?

This comment has been minimized.

Copy link
@dbkr

dbkr Dec 15, 2016

Author Member

Done

@dbkr dbkr removed their assignment Dec 15, 2016
}
}

return options;
}

_makeMenuOptionFromProtocolInstance(server, protocol, instance, wire_onclick) {

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 15, 2016

Member

right, but it doesn't seem to be set in either of the places it's called.

and oh, wire is a verb. How about handleClicks or something? (don't we do camelCase rather than underscores?)

or just have an onProtocolInstanceClicked parameter, and pass in this.onMenuOptionClickProtocolInstance or null.

});
this.props.onOptionChange(server, network);
}

onMenuOptionClickProtocolInstance(server, instance_id, ev) {

This comment has been minimized.

Copy link
@richvdh

richvdh Dec 15, 2016

Member

ev seems redundant

This comment has been minimized.

Copy link
@dbkr

dbkr Dec 15, 2016

Author Member

done

@richvdh richvdh assigned dbkr and unassigned richvdh Dec 15, 2016
dbkr added 2 commits Dec 15, 2016
and actually pass handleClicks false as appropriate
@dbkr dbkr assigned richvdh and unassigned dbkr Dec 15, 2016
@richvdh richvdh merged commit 61f9966 into develop Dec 15, 2016
2 checks passed
2 checks passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.