]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/salmonaction.php
More verbose salmon debugging
[quix0rs-gnu-social.git] / plugins / OStatus / lib / salmonaction.php
index 6855fd1b180af27c9a2de155503fab2451c0df48..13f49f4effa6fcfa4cacba5e7c1d58ba299e681a 100644 (file)
@@ -83,6 +83,8 @@ class SalmonAction extends Action
         // Cryptographic verification test, throws exception on failure
         $magic_env->verify($this->actor);
 
+        common_debug('Salmon slap is carrying activity URI=='._ve($this->activity->id));
+
         return true;
     }
 
@@ -98,6 +100,7 @@ class SalmonAction extends Action
         assert($this->target instanceof Profile);
 
         common_log(LOG_DEBUG, "Got a " . $this->activity->verb);
+
         try {
             $options = [ 'source' => 'ostatus' ];
             common_debug('Save salmon slap directly with Notice::saveActivity for actor=='.$this->actor->getID());
@@ -109,6 +112,9 @@ class SalmonAction extends Action
             // duplicate? Maybe someone's database is out of sync?
             // Let's just accept it and move on.
             common_log(LOG_INFO, 'Salmon slap carried an event which had already been fulfilled.');
+            return true;
+        } catch (NoticeSaveException $e) {
+            common_debug('Notice::saveActivity did not save our '._ve($this->activity->verb).' activity, trying old-fashioned salmon saving.');
         }
 
         try {