diff --git a/classes/LBRY_Daemon.php b/classes/LBRY_Daemon.php index 63352ef..dde6c21 100644 --- a/classes/LBRY_Daemon.php +++ b/classes/LBRY_Daemon.php @@ -149,6 +149,7 @@ class LBRY_Daemon 'publish', $args ); + $this->logger->log('publish success!', 'Successfully published post with result: ' . print_r($result->result, true)); return $result->result; } catch (LBRYDaemonException $e) { $this->logger->log('publish error', $e->getMessage() . ' | Code: ' . $e->getCode()); diff --git a/classes/LBRY_Network.php b/classes/LBRY_Network.php index aa1400e..34468f1 100644 --- a/classes/LBRY_Network.php +++ b/classes/LBRY_Network.php @@ -93,7 +93,7 @@ class LBRY_Network update_post_meta($post_id, LBRY_POST_CHANNEL, $new_channel); } - if ($will_publish) { + if ($will_publish && $post->post_status == 'publish') { // Publish the post on the LBRY Network $this->publisher->publish($post, get_post_meta($post_id, LBRY_POST_CHANNEL, true)); }