aboutsummaryrefslogtreecommitdiffstats
path: root/addon/statusnet/statusnet.php
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/statusnet/statusnet.php
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/statusnet/statusnet.php')
-rw-r--r--addon/statusnet/statusnet.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/addon/statusnet/statusnet.php b/addon/statusnet/statusnet.php
index b18eac2b8..2ce4b7eab 100644
--- a/addon/statusnet/statusnet.php
+++ b/addon/statusnet/statusnet.php
@@ -374,6 +374,9 @@ function statusnet_post_hook(&$a,&$b) {
$statusnet_post = get_pconfig(local_user(),'statusnet','post');
$statusnet_enable = (($statusnet_post && x($_POST,'statusnet_enable')) ? intval($_POST['statusnet_enable']) : 0);
+ // if API is used, default to the chosen settings
+ if($_POST['api_source'] && intval(get_pconfig(local_user(),'statusnet','post_by_default')))
+ $statusnet_enable = 1;
if($statusnet_enable && $statusnet_post) {
require_once('include/bbcode.php');