theoretically scope the search, but it doesn't work

This commit is contained in:
Matthew Hodgson 2015-10-29 02:24:35 +00:00
parent 2ee840922d
commit eb6fbe6a5a
1 changed files with 15 additions and 1 deletions

View File

@ -360,12 +360,26 @@ module.exports = {
},
onSearch: function(term, scope) {
var filter;
if (scope === "Room") { // FIXME: should be enum
filter = {
room: {
timeline: {
rooms: [
this.props.roomId
]
}
}
};
}
var self = this;
MatrixClientPeg.get().search({
body: {
search_categories: {
room_events: {
search_term: term,
filter: filter,
event_context: {
before_limit: 1,
after_limit: 1,