From bbd545b9caa278d61ad423725dc591b3eb0e61f7 Mon Sep 17 00:00:00 2001 From: Friendika Date: Sun, 14 Aug 2011 04:26:41 -0700 Subject: honour "post to xxx network by default" when using API --- addon/twitter/twitter.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'addon/twitter/twitter.php') diff --git a/addon/twitter/twitter.php b/addon/twitter/twitter.php index c3fbc3e64..b1c8a0a89 100644 --- a/addon/twitter/twitter.php +++ b/addon/twitter/twitter.php @@ -225,6 +225,10 @@ function twitter_post_hook(&$a,&$b) { $twitter_post = intval(get_pconfig(local_user(),'twitter','post')); $twitter_enable = (($twitter_post && x($_POST,'twitter_enable')) ? intval($_POST['twitter_enable']) : 0); + // if API is used, default to the chosen settings + if($_POST['api_source'] && intval(get_pconfig(local_user(),'twitter','post_by_default'))) + $twitter_enable = 1; + if($twitter_post && $twitter_enable) { logger('Posting to Twitter', LOGGER_DEBUG); require_once('library/twitteroauth.php'); -- cgit v1.2.3