]> git.mxchange.org Git - friendica.git/commitdiff
keep private emails out of any offsite feeds
authorFriendika <info@friendika.com>
Thu, 11 Aug 2011 04:46:19 +0000 (21:46 -0700)
committerFriendika <info@friendika.com>
Thu, 11 Aug 2011 04:46:19 +0000 (21:46 -0700)
include/items.php
include/notifier.php

index a378a632c04a87305b6514d28105e7c6f0494a23..be231f34df4b76251a120e66f30a0d48b8b048c7 100644 (file)
@@ -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';
index e1bb29eaf22359ec5a283770ffc0c5d475a74002..bd78d7560c1ff6519e78a6870c0f508bf7c808a4 100644 (file)
@@ -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;