Fix twitter list filter test #613, fix and change getName() for lists. (#614)

This commit is contained in:
Matt DeMoss 2018-01-12 07:07:40 -05:00 committed by Teromene
parent 93e0562353
commit 90d7ae8776

View file

@ -77,9 +77,7 @@ class TwitterBridge extends BridgeAbstract {
$param = 'u'; $param = 'u';
break; break;
case 'By list': case 'By list':
$specific = $this->getInput('user'); return $this->getInput('list') . ' - Twitter list by ' . $this->getInput('user');
$param = 'list';
break;
default: return parent::getName(); default: return parent::getName();
} }
return 'Twitter ' . $specific . $this->getInput($param); return 'Twitter ' . $specific . $this->getInput($param);
@ -165,7 +163,7 @@ class TwitterBridge extends BridgeAbstract {
switch($this->queriedContext) { switch($this->queriedContext) {
case 'By list': case 'By list':
// Check if filter applies to list (using raw content) // Check if filter applies to list (using raw content)
if(!is_null($this->getInput('filter'))) { if($this->getInput('filter')) {
if(stripos($tweet->find('p.js-tweet-text', 0)->plaintext, $this->getInput('filter')) === false) { if(stripos($tweet->find('p.js-tweet-text', 0)->plaintext, $this->getInput('filter')) === false) {
continue 2; // switch + for-loop! continue 2; // switch + for-loop!
} }