Skip to content

Commit

Permalink
Excludes retweets from Twitter results when not searching to_user or …
Browse files Browse the repository at this point in the history
…by_user

fixes #40.
  • Loading branch information
pepegar committed Aug 29, 2013
1 parent 548b66a commit 9b9e998
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/twitter/service.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ public function request( array $request ) {
if ( 'images' == $request['tab'] )
$q[] = 'filter:images';

// Exclude retweets from certain searches
if ( ! isset( $params['by_user'] ) && ! isset( $params['to_user'] ) )
$q[] = '+exclude:retweets';

$args = array(
'q' => implode( ' ', $q ),
'result_type' => 'recent',
Expand Down

0 comments on commit 9b9e998

Please sign in to comment.