Last active
August 29, 2015 14:02
-
-
Save mrvdb/dde3a80656ee78d1474b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/actions/apitimelineuser.php b/actions/apitimelineuser.php | |
index d3e3ba8..7c44871 100644 | |
--- a/actions/apitimelineuser.php | |
+++ b/actions/apitimelineuser.php | |
@@ -228,8 +228,15 @@ class ApiTimelineUserAction extends ApiBareAuthAction | |
while ($notice->fetch()) { | |
if (count($notices) < $this->count) { | |
- // TODO: a feed without replies would be useful (extra param?) | |
- $notices[] = clone($notice); | |
+ if(array_key_exists('postsonly',$this->args) && $this->args['postsonly']==1) { | |
+ if ($notice->get_object_type(True) == 'note') { | |
+ // Only include notes, no comments | |
+ $notices[] = clone($notice); | |
+ } | |
+ } else { | |
+ $notices[] = clone($notice); | |
+ } | |
} else { | |
$this->next_id = $notice->id; | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment