]> git.mxchange.org Git - friendica.git/commitdiff
Don't send conversation slaps, only immediate replies. Redundant and flawed.
authorFriendika <info@friendika.com>
Sun, 16 Jan 2011 22:58:07 +0000 (14:58 -0800)
committerFriendika <info@friendika.com>
Sun, 16 Jan 2011 22:58:07 +0000 (14:58 -0800)
include/notifier.php
mod/salmon.php

index 7791b9bd4be5bcda51c4cd535f686eb93d5d91bf..683cff360e03da31b873ef62b05fd4b70802bb61 100644 (file)
                ));
        }
        else {
-
                if($followup) {
                        foreach($items as $item) {  // there is only one item
                                if($item['id'] == $item_id) {
                                        continue;
 
                                $atom   .= atom_entry($item,'text',$contact,$owner,true);
-                               $slaps[] = atom_entry($item,'html',$contact,$owner,true);
+
+                               // There's a problem here - we *were* going to use salmon to provide semi-authenticated
+                               // communication to OStatus, but unless we're the item author they won't verify.
+                               // commented out for now, though we'll still send local replies (and any mentions 
+                               // that they contain) upstream. Rethinking the problem space.
+//                             $slaps[] = atom_entry($item,'html',$contact,$owner,true);
                        }
                }
        }
 
        logger('notifier: ' . $atom, LOGGER_DATA);
 
-       logger('notifier: slaps: ' . print_r($slaps,true), LOGGER_DATA);
+//     logger('notifier: slaps: ' . print_r($slaps,true), LOGGER_DATA);
 
        if($followup)
                $recip_str = $parent['contact-id'];
                
        // send additional slaps to mentioned remote tags (@foo@example.com)
 
-       if(count($slaps) && count($url_recipients) && $notify_hub) {
+       if($slap && count($url_recipients) && $followup && $notify_hub) {
                foreach($url_recipients as $url) {
-                       logger('notifier: urldelivery: ' . $url);
-                       foreach($slaps as $slappy) {
-                               if($url) {
-                                       $deliver_status = slapper($owner,$url,$slappy);
-                                       // TODO: redeliver/queue these items on failure, though there is no contact record
-                               }
+                       if($url) {
+                               logger('notifier: urldelivery: ' . $url);
+                               $deliver_status = slapper($owner,$url,$slap);
+                               // TODO: redeliver/queue these items on failure, though there is no contact record
                        }
                }
        }
index 2ae6aa6287e1027201b8abccbbc136e4912c7000..8c7d921c86041328549b7e299647f2aa59775937 100644 (file)
@@ -199,7 +199,12 @@ function salmon_post(&$a) {
 
        $hub = '';
 
-       // consume_feed will only accept a follow activity from this person if there is no contact record.
+       /**
+        *
+        * anti-spam measure: consume_feed will accept a follow activity from 
+        * this person (and nothing else) if there is no existing contact record.
+        *
+        */
 
        $contact_rec = ((count($r)) ? $r[0] : null);