diff --git a/src/main/scala/fr/totetmatt/mediamur/twitter/TwitterStream.scala b/src/main/scala/fr/totetmatt/mediamur/twitter/TwitterStream.scala index 8c5d305..f1b7848 100644 --- a/src/main/scala/fr/totetmatt/mediamur/twitter/TwitterStream.scala +++ b/src/main/scala/fr/totetmatt/mediamur/twitter/TwitterStream.scala @@ -83,12 +83,11 @@ class TwitterStream(implicit materializer:ActorMaterializer) { if(isRunning) { stopStream() } - this.searchQuery = searchQuery - if(searchQuery.isEmpty) { - if(sampleStream) { - twitterStream.sample() - } + + if(sampleStream) { + twitterStream.sample() } else { + this.searchQuery = searchQuery twitterStream.filter(searchQuery:_*) } isRunning = true