]> git.mxchange.org Git - friendica.git/commitdiff
attribution issue - don't take author name from contact if available from item.
authorfriendica <info@friendica.com>
Sat, 25 Feb 2012 04:03:13 +0000 (20:03 -0800)
committerfriendica <info@friendica.com>
Sat, 25 Feb 2012 04:03:13 +0000 (20:03 -0800)
doc/Groups-and-Privacy.md
include/delivery.php
include/items.php
include/notifier.php

index 0ab1d7b45d3e03be8a5a27ed83a3e8b836488e54..09c6a7349b621b53a4f89499b18e068abd7d1bed 100644 (file)
@@ -38,7 +38,7 @@ In case you haven't yet figured this out, we are encouraging you to encourage yo
 Profiles, Privacy, and Photos
 =============================
 
-The decentralised nature of Friendica (many websites exchanging information rather than one website which controls everything) has some implications with privacy as it relates to people on other sites. These are things you should be aware of, so you can decide best how to interact privately.
+The decentralised nature of Friendica (many websites exchanging information rather than one website which controls everything) has some implications with privacy as it relates to people on other sites. There are things you should be aware of, so you can decide best how to interact privately.
 
 Sharing photos privately is a problem. We can only share them __privately__ with Friendica members. In order to share with other people, we need to prove who they are. We can prove the identity of Friendica members, as we have a mechanism to do so. Your friends on other networks will be blocked from viewing these private photos because we cannot prove that they should be allowed to see them.
 
@@ -48,6 +48,6 @@ Your profile and "wall" may also be visited by your friends from other networks,
 
 This may produce undesired results when posting a long status message to (for instance) Twitter and even Facebook. When Friendica sends a post to these networks which exceeds the service length limit, we truncate it and provide a link to the original. The original is a link back to your Friendica profile. As Friendica cannot prove who they are, it may not be possible for these people to view your post in full.    
 
-For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends on other networks.
+For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends that can see the post in full. 
 
-Blocking your profile or entire Friendica site from unknown web visitors also has serious implications for communicating with StatusNet/identi.ca members. These networks communicate with others via public protocols that are not authenticated. In order to view your posts, these networks have to access them as an "unknown web visitor". If we allowed this, it would mean anybody could in fact see your posts, and you've instructed Friendica not to allow this. So be aware that the act of blocking your profile to unknown visitors has the effect of blocking communication with public networks (such as identi.ca) and feed readers such as Google Reader.   
\ No newline at end of file
+Blocking your profile or entire Friendica site from unknown web visitors also has serious implications for communicating with StatusNet/identi.ca members. These networks communicate with others via public protocols that are not authenticated. In order to view your posts, these networks have to access them as an "unknown web visitor". If we allowed this, it would mean anybody could in fact see your posts, and you've instructed Friendica not to allow this. So be aware that the act of blocking your profile to unknown visitors also has the effect of blocking outbound communication with public networks (such as identi.ca) and feed readers such as Google Reader.   
\ No newline at end of file
index 677d893889ce79a6be6ff93815d57d9a52ac09e4..cbf602a0b487f5745407eb754c24b4478252d619 100755 (executable)
@@ -272,10 +272,10 @@ function delivery_run($argv, $argc){
 
                                if($normal_mode) {
                                        if($item_id == $item['id'] || $item['id'] == $item['parent'])
-                                               $atom .= atom_entry($item,'text',$item_contact,$owner,true);
+                                               $atom .= atom_entry($item,'text',null,$owner,true);
                                }
                                else
-                                       $atom .= atom_entry($item,'text',$item_contact,$owner,true);
+                                       $atom .= atom_entry($item,'text',null,$owner,true);
 
                        }
 
@@ -363,7 +363,7 @@ function delivery_run($argv, $argc){
                                                continue;
 
                                        if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire)) 
-                                               $slaps[] = atom_entry($item,'html',$item_contact,$owner,true);
+                                               $slaps[] = atom_entry($item,'html',null,$owner,true);
                                }
 
                                logger('notifier: slapdelivery: ' . $contact['name']);
index 347826042e66cc79a53a321567e6f4e778c028c1..ba4ec036fe2045d2ce3d207391f1d54bda203f9b 100755 (executable)
@@ -1505,13 +1505,18 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                $item_id  = $item->get_id();
                                $datarray = get_atom_elements($feed,$item);
 
-                               if(! x($datarray,'author-name'))
+
+                               if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN))
                                        $datarray['author-name'] = $contact['name'];
-                               if(! x($datarray,'author-link'))
+                               if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN))
                                        $datarray['author-link'] = $contact['url'];
-                               if(! x($datarray,'author-avatar'))
+                               if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN))
                                        $datarray['author-avatar'] = $contact['thumb'];
 
+                               if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) {
+                                       logger('consume_feed: no author information! ' . print_r($datarray,true));
+                                       continue;
+                               }
 
                                $r = q("SELECT `uid`, `last-child`, `edited`, `body` FROM `item` WHERE `uri` = '%s' AND `uid` = %d LIMIT 1",
                                        dbesc($item_id),
@@ -1614,14 +1619,19 @@ function consume_feed($xml,$importer,&$contact, &$hub, $datedir = 0, $pass = 0)
                                $datarray = get_atom_elements($feed,$item);
 
                                if(is_array($contact)) {
-                                       if(! x($datarray,'author-name'))
+                                       if((! x($datarray,'author-name')) && ($contact['network'] != NETWORK_DFRN))
                                                $datarray['author-name'] = $contact['name'];
-                                       if(! x($datarray,'author-link'))
+                                       if((! x($datarray,'author-link')) && ($contact['network'] != NETWORK_DFRN))
                                                $datarray['author-link'] = $contact['url'];
-                                       if(! x($datarray,'author-avatar'))
+                                       if((! x($datarray,'author-avatar')) && ($contact['network'] != NETWORK_DFRN))
                                                $datarray['author-avatar'] = $contact['thumb'];
                                }
 
+                               if((! x($datarray,'author-name')) || (! x($datarray,'author-link'))) {
+                                       logger('consume_feed: no author information! ' . print_r($datarray,true));
+                                       continue;
+                               }
+
                                // special handling for events
 
                                if((x($datarray,'object-type')) && ($datarray['object-type'] === ACTIVITY_OBJ_EVENT)) {
index 37bc6dae512cad68efcdb55d5fbb0cb4dff736e5..8ec6252860893d4f5d72f9cbd19348975d612d69 100755 (executable)
@@ -382,8 +382,8 @@ function notifier_run($argv, $argc){
                                        continue;
                                if($item['id'] == $item_id) {
                                        logger('notifier: followup: item: ' . print_r($item,true), LOGGER_DATA);
-                                       $slap  = atom_entry($item,'html',$owner,$owner,false);
-                                       $atom .= atom_entry($item,'text',$owner,$owner,false);
+                                       $slap  = atom_entry($item,'html',null,$owner,false);
+                                       $atom .= atom_entry($item,'text',null,$owner,false);
                                }
                        }
                }
@@ -410,13 +410,13 @@ function notifier_run($argv, $argc){
                                        // older sites without a corresponding dfrn_notify change may do the wrong thing.
 
                                    if($item_id == $item['id'] || $item['id'] == $item['parent'])
-                                               $atom .= atom_entry($item,'text',$contact,$owner,true);
+                                               $atom .= atom_entry($item,'text',null,$owner,true);
                                }
                                else
-                                       $atom .= atom_entry($item,'text',$contact,$owner,true);
+                                       $atom .= atom_entry($item,'text',null,$owner,true);
 
                                if(($top_level) && ($public_message) && ($item['author-link'] === $item['owner-link']) && (! $expire)) 
-                                       $slaps[] = atom_entry($item,'html',$contact,$owner,true);
+                                       $slaps[] = atom_entry($item,'html',null,$owner,true);
                        }
                }
        }