]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Merge remote-tracking branch 'upstream/master'
authorRoland Haeder <roland@mxchange.org>
Sun, 24 Jan 2016 15:13:11 +0000 (16:13 +0100)
committerRoland Haeder <roland@mxchange.org>
Sun, 24 Jan 2016 15:13:11 +0000 (16:13 +0100)
1  2 
lib/default.php
lib/installer.php
plugins/OStatus/classes/Ostatus_profile.php
plugins/OStatus/lib/ostatusqueuehandler.php
plugins/OpportunisticQM/lib/opportunisticqueuemanager.php

diff --cc lib/default.php
Simple merge
Simple merge
index 9d41b6727341d41eaa31949f574bd1b2c6cd47c4,a8269bdf0728594687656769ec2ef4e12e719446..07432d78fa1c4d65a3134973bcc948ec7a84e38c
@@@ -371,20 -371,24 +371,25 @@@ class Ostatus_profile extends Managed_D
       * send immediately but won't get the return value.
       *
       * @param mixed $entry XML string, Notice, or Activity
 +     * @param Profile $actor Acting profile
       * @return boolean success
       */
 -    public function notifyDeferred($entry, $actor)
 +    public function notifyDeferred($entry, Profile $actor)
      {
          if ($this->salmonuri) {
-             common_debug("OSTATUS: user {$actor->getNickname()} ({$actor->getID()}) wants to ping {$this->localProfile()->getNickname()} on {$this->salmonuri}");
-             $data = array('salmonuri' => $this->salmonuri,
-                           'entry' => $this->notifyPrepXml($entry),
-                           'actor' => $actor->getID(),
-                           'target' => $this->localProfile()->getID());
-             $qm = QueueManager::get();
-             return $qm->enqueue($data, 'salmon');
+             try {
+                 common_debug("OSTATUS: user {$actor->getNickname()} ({$actor->getID()}) wants to ping {$this->localProfile()->getNickname()} on {$this->salmonuri}");
+                 $data = array('salmonuri' => $this->salmonuri,
+                               'entry' => $this->notifyPrepXml($entry),
+                               'actor' => $actor->getID(),
+                               'target' => $this->localProfile()->getID());
+                 $qm = QueueManager::get();
+                 return $qm->enqueue($data, 'salmon');
+             } catch (Exception $e) {
+                 common_log(LOG_ERR, 'OSTATUS: Something went wrong when creating a Salmon slap: '._ve($e->getMessage()));
+                 return false;
+             }
          }
  
          return false;