forked from matrix/element-web
theoretically scope the search, but it doesn't work
This commit is contained in:
parent
2ee840922d
commit
eb6fbe6a5a
|
@ -360,12 +360,26 @@ module.exports = {
|
||||||
},
|
},
|
||||||
|
|
||||||
onSearch: function(term, scope) {
|
onSearch: function(term, scope) {
|
||||||
|
var filter;
|
||||||
|
if (scope === "Room") { // FIXME: should be enum
|
||||||
|
filter = {
|
||||||
|
room: {
|
||||||
|
timeline: {
|
||||||
|
rooms: [
|
||||||
|
this.props.roomId
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
MatrixClientPeg.get().search({
|
MatrixClientPeg.get().search({
|
||||||
body: {
|
body: {
|
||||||
search_categories: {
|
search_categories: {
|
||||||
room_events: {
|
room_events: {
|
||||||
search_term: term,
|
search_term: term,
|
||||||
|
filter: filter,
|
||||||
event_context: {
|
event_context: {
|
||||||
before_limit: 1,
|
before_limit: 1,
|
||||||
after_limit: 1,
|
after_limit: 1,
|
||||||
|
|
Loading…
Reference in New Issue