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/statusnet/statusnet.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'addon/statusnet/statusnet.php') 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'); -- cgit v1.2.3