Only publish on published posts, not drafts
This commit is contained in:
parent
51309c6876
commit
b07c9d23e3
2 changed files with 2 additions and 1 deletions
|
@ -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());
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue