X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FOStatus%2Flib%2Fpushinqueuehandler.php;h=9802baffe238823d3a28d993f31fad34e3c8e6f5;hb=a0e107f17f27bc1dfc49de2a4493a461213e782e;hp=a90f52df26fce37b93b7155ad9a217c343aa1481;hpb=0c7844734edbed42c2ea3046dc1418cba828e583;p=quix0rs-gnu-social.git
diff --git a/plugins/OStatus/lib/pushinqueuehandler.php b/plugins/OStatus/lib/pushinqueuehandler.php
index a90f52df26..9802baffe2 100644
--- a/plugins/OStatus/lib/pushinqueuehandler.php
+++ b/plugins/OStatus/lib/pushinqueuehandler.php
@@ -17,12 +17,15 @@
* along with this program. If not, see .
*/
+if (!defined('STATUSNET')) {
+ exit(1);
+}
+
/**
* Process a feed distribution POST from a PuSH hub.
* @package FeedSub
* @author Brion Vibber
*/
-
class PushInQueueHandler extends QueueHandler
{
function transport()
@@ -38,9 +41,13 @@ class PushInQueueHandler extends QueueHandler
$post = $data['post'];
$hmac = $data['hmac'];
- $feedsub = FeedSub::staticGet('id', $feedsub_id);
+ $feedsub = FeedSub::getKV('id', $feedsub_id);
if ($feedsub) {
- $feedsub->receive($post, $hmac);
+ try {
+ $feedsub->receive($post, $hmac);
+ } catch(Exception $e) {
+ common_log(LOG_ERR, "Exception during PuSH input processing for $feedsub->uri: " . $e->getMessage());
+ }
} else {
common_log(LOG_ERR, "Discarding POST to unknown feed subscription id $feedsub_id");
}