From 09bb2d5cf6c98c280a299e2740675f207e77ea4c Mon Sep 17 00:00:00 2001 From: Michael Vogel Date: Thu, 16 May 2013 23:36:05 +0200 Subject: [PATCH] pumpio: Only public posts will be mirrored --- pumpio/pumpio.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/pumpio/pumpio.php b/pumpio/pumpio.php index a68ba4635..b7634bcbd 100755 --- a/pumpio/pumpio.php +++ b/pumpio/pumpio.php @@ -458,7 +458,20 @@ function pumpio_fetchtimeline($a, $uid) { if ($first_time) continue; - if (!strstr($post->generator->displayName, $application_name)) { + $receiptians = array(); + if (@is_array($post->cc)) + $receiptians = array_merge($receiptians, $post->cc); + + if (@is_array($post->to)) + $receiptians = array_merge($receiptians, $post->to); + + $public = false; + foreach ($receiptians AS $receiver) + if (is_string($receiver->objectType)) + if ($receiver->id == "http://activityschema.org/collection/public") + $public = true; + + if ($public AND !strstr($post->generator->displayName, $application_name)) { require_once('include/html2bbcode.php'); $_SESSION["authenticated"] = true;