Skip to content

Commit

Permalink
Merge pull request #14 from RSS-Bridge/master
Browse files Browse the repository at this point in the history
2022.04.27
  • Loading branch information
senrou authored Apr 27, 2022
2 parents 3f9a5b0 + 63b08f7 commit 9a03a7d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 2 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"service": "Heroku",
"name": "RSS-Bridge",
"name": "rss-bridge-heroku",
"description": "RSS-Bridge is a PHP project capable of generating RSS and Atom feeds for websites which don't have one.",
"repository": "https://github.com/RSS-Bridge/rss-bridge",
"repository": "https://github.com/RSS-Bridge/rss-bridge?1651005770",
"keywords": ["php", "rss-bridge", "rss"]
}

7 changes: 4 additions & 3 deletions bridges/AsahiShimbunAJWBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ class AsahiShimbunAJWBridge extends BridgeAbstract {
'Culture » Style' => 'culture/style',
'Culture » Movies' => 'culture/movies',
'Culture » Manga & Anime' => 'culture/manga_anime',
'Asia » China' => 'asia/china',
'Asia » Korean Peninsula' => 'asia/korean_peninsula',
'Asia » Around Asia' => 'asia/around_asia',
'Asia » China' => 'asia_world/china',
'Asia » Korean Peninsula' => 'asia_world/korean_peninsula',
'Asia » Around Asia' => 'asia_world/around_asia',
'Asia » World' => 'asia_world/world',
'Opinion » Editorial' => 'opinion/editorial',
'Opinion » Vox Populi' => 'opinion/vox',
),
Expand Down
7 changes: 6 additions & 1 deletion bridges/TwitterV2Bridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ public function collectData() {

// Start setting values needed for HTML output
if($isRetweet || is_null($user)) {
Debug::log('Tweet is retweet, or $user is null');
// Replace tweet object with original retweeted object
if($isRetweet) {
foreach($includesTweets as $includesTweet) {
Expand All @@ -380,17 +381,21 @@ public function collectData() {
// Get user object for retweeted tweet
$originalUser = new stdClass(); // make the linters stop complaining
if(isset($retweetedUsers)) {
Debug::log('Searching for tweet author_id in $retweetedUsers');
foreach($retweetedUsers as $retweetedUser) {
if($retweetedUser->id === $tweet->author_id) {
$originalUser = $retweetedUser;
Debug::log('Found author_id match in $retweetedUsers');
break;
}
}
}
if(!$originalUser && isset($includesUsers)) {
if(!isset($originalUser->username) && isset($includesUsers)) {
Debug::log('Searching for tweet author_id in $includesUsers');
foreach($includesUsers as $includesUser) {
if($includesUser->id === $tweet->author_id) {
$originalUser = $includesUser;
Debug::log('Found author_id match in $includesUsers');
break;
}
}
Expand Down

0 comments on commit 9a03a7d

Please sign in to comment.