function handle($notice)
 {
     try {
         $profile = $notice->getProfile();
     } catch (Exception $e) {
         common_log(LOG_ERR, "Dropping RSSCloud item for notice with bogus profile: " . $e->getMessage());
         return true;
     }
     $notifier = new RSSCloudNotifier();
     return $notifier->notify($profile);
 }
Example #2
0
 function handle($notice)
 {
     $profile = $notice->getProfile();
     $notifier = new RSSCloudNotifier();
     return $notifier->notify($profile);
 }
 /**
  * Test that a notification handler is there and is reponding
  * correctly.  This is called before adding a subscription.
  *
  * @param string $feed the feed to verify
  *
  * @return boolean success result
  */
 function testNotificationHandler($feed)
 {
     $notifyUrl = $this->getNotifyUrl();
     $notifier = new RSSCloudNotifier();
     if (isset($this->domain)) {
         // 'domain' param set, so we have to use GET and send a challenge
         common_log(LOG_INFO, 'RSSCloud plugin - Testing notification handler with challenge: ' . $notifyUrl);
         return $notifier->challenge($notifyUrl, $feed);
     } else {
         common_log(LOG_INFO, 'RSSCloud plugin - Testing notification handler: ' . $notifyUrl);
         return $notifier->postUpdate($notifyUrl, $feed);
     }
 }