From ac4ce27e88fa8d5c5298e2a35538215fed596dd4 Mon Sep 17 00:00:00 2001 From: Friendika Date: Wed, 10 Aug 2011 21:46:19 -0700 Subject: [PATCH] keep private emails out of any offsite feeds --- include/items.php | 3 +++ include/notifier.php | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/include/items.php b/include/items.php index a378a632c..be231f34d 100644 --- a/include/items.php +++ b/include/items.php @@ -153,6 +153,9 @@ function get_feed_for(&$a, $dfrn_id, $owner_nick, $last_update, $direction = 0) if($dfrn_id === '') { $type = 'html'; + // catch any email that's in a public conversation and make sure it doesn't leak + if($item['private']) + continue; } else { $type = 'text'; diff --git a/include/notifier.php b/include/notifier.php index e1bb29eaf..bd78d7560 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -289,6 +289,11 @@ function notifier_run($argv, $argc){ if(! $item['parent']) continue; + // private emails may be in included in public conversations. Filter them. + + if(($notify_hub) && $item['private']) + continue; + $contact = get_item_contact($item,$contacts); if(! $contact) continue;