aboutsummaryrefslogtreecommitdiffstats
path: root/addon/twitter
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-08-14 04:26:41 -0700
committerFriendika <info@friendika.com>2011-08-14 04:26:41 -0700
commitbbd545b9caa278d61ad423725dc591b3eb0e61f7 (patch)
treeb4e8da86ec53e26eeeb0eb31f3a60dd7aa966492 /addon/twitter
parent025485ea69a8c40ae0357987c285c47d51a7b284 (diff)
downloadvolse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.tar.gz
volse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.tar.bz2
volse-hubzilla-bbd545b9caa278d61ad423725dc591b3eb0e61f7.zip
honour "post to xxx network by default" when using API
Diffstat (limited to 'addon/twitter')
-rw-r--r--addon/twitter/twitter.php4
1 files changed, 4 insertions, 0 deletions
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');