mirror of
https://github.com/irislib/iris-messenger.git
synced 2024-09-20 01:56:33 +00:00
use search relays for search
This commit is contained in:
parent
c08b73af30
commit
cddf9d2d64
@ -116,7 +116,13 @@ const PubSub = {
|
||||
},
|
||||
|
||||
subscribeRelayPool(filter: Filter, sinceLastOpened: boolean) {
|
||||
let relays: any = Array.from(Relays.relays.keys());
|
||||
let relays: any;
|
||||
if (filter.keywords) {
|
||||
// search relays
|
||||
relays = Array.from(Relays.searchRelays.keys());
|
||||
} else {
|
||||
relays = Array.from(Relays.relays.keys());
|
||||
}
|
||||
// if any of filters[] doesn't have authors, we need to define default relays
|
||||
/*
|
||||
if (!filter.authors) {
|
||||
|
@ -35,13 +35,6 @@ class Feed extends View {
|
||||
localState.get('filters').get('group').on(this.inject());
|
||||
}
|
||||
|
||||
filter(msg) {
|
||||
if (this.state.searchTerm) {
|
||||
return msg.text && msg.text.toLowerCase().indexOf(this.state.searchTerm) > -1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
renderView() {
|
||||
const s = this.state;
|
||||
let path = this.props.index || 'msgs';
|
||||
@ -64,7 +57,6 @@ class Feed extends View {
|
||||
: html` <${OnboardingNotification} /> `}
|
||||
<${FeedComponent}
|
||||
scrollElement=${this.scrollElement.current}
|
||||
filter=${s.searchTerm && ((m) => this.filter(m))}
|
||||
keyword=${s.searchTerm}
|
||||
key=${this.props.index || 'feed'}
|
||||
index=${this.props.index}
|
||||
|
Loading…
Reference in New Issue
Block a user