Skip to content

Support room dir 3rd party network filtering#2747

Merged
richvdh merged 5 commits intodevelopfrom
dbkr/third_party_filter
Dec 15, 2016
Merged

Support room dir 3rd party network filtering#2747
richvdh merged 5 commits intodevelopfrom
dbkr/third_party_filter

Conversation

@dbkr
Copy link
Copy Markdown
Member

@dbkr 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
Copy link
Copy Markdown
Member

Looks like you're hitting the right APIs.

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

@richvdh richvdh left a comment

Choose a reason for hiding this comment

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

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) {
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.

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

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.

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).

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.

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.

</div>;
}

protocolNameForInstanceId(instance_id) {
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.

needs _ if it's private

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.

Done

if (my_server != MatrixClientPeg.getHomeServerName()) {
opts.server = my_server;
}
if (this.state.instance_id) {
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.

add instance_id to getInitialState?

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.

Done

@dbkr dbkr removed their assignment Dec 15, 2016
return options;
}

_makeMenuOptionFromProtocolInstance(server, protocol, instance, wire_onclick) {
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.

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) {
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.

ev seems redundant

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.

done

@richvdh richvdh assigned dbkr and unassigned richvdh Dec 15, 2016
dbkr added 2 commits December 15, 2016 14:24
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
@t3chguy t3chguy deleted the dbkr/third_party_filter branch May 12, 2022 08:56
t3chguy pushed a commit that referenced this pull request Mar 25, 2026
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

3 participants