-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Directory network selector #2219
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm otherwise
@@ -32,6 +32,13 @@ var sanitizeHtml = require('sanitize-html'); | |||
|
|||
linkifyMatrix(linkify); | |||
|
|||
const NETWORK_PATTERNS = { | |||
'gitter': /#gitter_.*/, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
surely these should all be hardcoded to :matrix.org
as the domain?
|
||
this.networkIcons = { | ||
'matrix:matrix_org': '//matrix.org/favicon.ico', | ||
'irc:freenode': '//matrix.org/_matrix/media/v1/download/matrix.org/DHLHpDDgWNNejFmrewvwEAHX', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hah :P it might be a bit less cute to just include the icons in vector though otherwise these are adding unnecessary 3rd party dependencies and vector is meant to be usable without 'net access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh , definitely: I was going to change it when we had actual icons for them, which I thought you'd probably want input on.
i'd expect to see otherwise LGTM |
Can do - I didn't put it in the sample sinc eit's hopefully very short term , i.e this will be unnecessary once the server sends the network info: same for not defaulting it (plus you won't get any networks unless you're pulling in matrix.org's directory which has now been turned off). |
hm, ok. let's at least put an example in sample.json. othewrise lgtm. |
(ie. every alias on the matrix.org HS, so currently everything, since we don't pull in any other directories)
i still think that we should be putting the actual :matrix.org bridges in the example config, so that folks can use them (when they query the matrix.org HS). otherwise, lgtm. |
dave: lgtm, please merge when safe |
Adds the network selector to filter down the room directory by what network the room is on. Currently works by having a hardcoded list of regexes that it tests all the room aliases against, awaiting a better interface on the server.