mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2024-11-22 17:45:40 +03:00
parent
0a118310cb
commit
d08b2616ef
1 changed files with 10 additions and 0 deletions
|
@ -124,6 +124,7 @@ EOD
|
||||||
private $apiKey = null;
|
private $apiKey = null;
|
||||||
private $guestToken = null;
|
private $guestToken = null;
|
||||||
private $authHeaders = [];
|
private $authHeaders = [];
|
||||||
|
private ?string $feedIconUrl = null;
|
||||||
|
|
||||||
public function detectParameters($url)
|
public function detectParameters($url)
|
||||||
{
|
{
|
||||||
|
@ -309,6 +310,10 @@ EOD
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($this->queriedContext === 'By username') {
|
||||||
|
$this->feedIconUrl = $data->user_info->legacy->profile_image_url_https ?? null;
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($tweets as $tweet) {
|
foreach ($tweets as $tweet) {
|
||||||
// Skip own Retweets...
|
// Skip own Retweets...
|
||||||
if (isset($tweet->retweeted_status) && $tweet->retweeted_status->user->id_str === $tweet->user->id_str) {
|
if (isset($tweet->retweeted_status) && $tweet->retweeted_status->user->id_str === $tweet->user->id_str) {
|
||||||
|
@ -497,6 +502,11 @@ EOD;
|
||||||
usort($this->items, ['TwitterBridge', 'compareTweetId']);
|
usort($this->items, ['TwitterBridge', 'compareTweetId']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getIcon()
|
||||||
|
{
|
||||||
|
return $this->feedIconUrl ?? parent::getIcon();
|
||||||
|
}
|
||||||
|
|
||||||
private static function compareTweetId($tweet1, $tweet2)
|
private static function compareTweetId($tweet1, $tweet2)
|
||||||
{
|
{
|
||||||
return (intval($tweet1['id']) < intval($tweet2['id']) ? 1 : -1);
|
return (intval($tweet1['id']) < intval($tweet2['id']) ? 1 : -1);
|
||||||
|
|
Loading…
Reference in a new issue