Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2022.04.27 #14

Merged
merged 4 commits into from
Apr 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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