mirror of https://github.com/vector-im/riot-web
Make the matrix.org section be everything
(ie. every alias on the matrix.org HS, so currently everything, since we don't pull in any other directories)pull/2219/head
parent
190cd884b5
commit
cd4564d3d3
|
@ -223,7 +223,7 @@ module.exports = React.createClass({
|
||||||
// FIXME: if incrementally typing, keep narrowing down the search set
|
// FIXME: if incrementally typing, keep narrowing down the search set
|
||||||
// incrementally rather than starting over each time.
|
// incrementally rather than starting over each time.
|
||||||
if (this.state.filterByNetwork) {
|
if (this.state.filterByNetwork) {
|
||||||
if (this._networkForRoom(a) != this.state.filterByNetwork) return false;
|
if (!this._isRoomInNetwork(a, this.state.filterByNetwork)) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (((a.name && a.name.toLowerCase().search(filter.toLowerCase()) >= 0) ||
|
return (((a.name && a.name.toLowerCase().search(filter.toLowerCase()) >= 0) ||
|
||||||
|
@ -301,16 +301,14 @@ module.exports = React.createClass({
|
||||||
* Terrible temporary function that guess what network a public room
|
* Terrible temporary function that guess what network a public room
|
||||||
* entry is in, until synapse is able to tell us
|
* entry is in, until synapse is able to tell us
|
||||||
*/
|
*/
|
||||||
_networkForRoom(room) {
|
_isRoomInNetwork(room, network) {
|
||||||
if (room.aliases) {
|
if (room.aliases && this.networkPatterns[network]) {
|
||||||
for (const alias of room.aliases) {
|
for (const alias of room.aliases) {
|
||||||
for (const network of Object.keys(this.networkPatterns)) {
|
if (this.networkPatterns[network].test(alias)) return true;
|
||||||
if (this.networkPatterns[network].test(alias)) return network;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 'matrix:matrix_org';
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
|
|
Loading…
Reference in New Issue