aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Item.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Item.php')
-rw-r--r--Zotlabs/Module/Item.php39
1 files changed, 31 insertions, 8 deletions
diff --git a/Zotlabs/Module/Item.php b/Zotlabs/Module/Item.php
index 965cbf173..d03b6ee30 100644
--- a/Zotlabs/Module/Item.php
+++ b/Zotlabs/Module/Item.php
@@ -9,7 +9,7 @@ use Zotlabs\Daemon\Master;
use Zotlabs\Lib\Activity;
use Zotlabs\Lib\ActivityStreams;
use Zotlabs\Lib\LDSignatures;
-use Zotlabs\Zot6\HTTPSig;
+use Zotlabs\Web\HTTPSig;
use Zotlabs\Lib\Libzot;
use Zotlabs\Lib\ThreadListener;
use App;
@@ -193,6 +193,25 @@ class Item extends Controller {
killme();
}
+
+ if(argc() > 1 && argv(1) !== 'drop') {
+ $x = q("select uid, item_wall, llink, mid from item where mid = '%s' ",
+ dbesc(z_root() . '/item/' . argv(1))
+ );
+ if($x) {
+ foreach($x as $xv) {
+ if (intval($xv['item_wall'])) {
+ $c = channelx_by_n($xv['uid']);
+ if ($c) {
+ goaway($c['xchan_url'] . '?mid=' . gen_link_id($xv['mid']));
+ }
+ }
+ }
+ goaway($x[0]['llink']);
+ }
+ http_status_exit(404, 'Not found');
+ }
+
}
@@ -551,10 +570,10 @@ class Item extends Controller {
$public_policy = $orig_post['public_policy'];
$private = $orig_post['item_private'];
}
-
- if($private || $public_policy || $acl->is_private())
- $private = 1;
-
+
+ if($public_policy || $acl->is_private()) {
+ $private = (($private) ? $private : 1);
+ }
$location = $orig_post['location'];
$coord = $orig_post['coord'];
@@ -631,12 +650,11 @@ class Item extends Controller {
$allow_empty = ((array_key_exists('allow_empty',$_REQUEST)) ? intval($_REQUEST['allow_empty']) : 0);
- $private = intval($acl->is_private() || ($public_policy));
+ $private = (($private) ? $private : intval($acl->is_private() || ($public_policy)));
// If this is a comment, set the permissions from the parent.
if($parent_item) {
- $private = 0;
$acl->set($parent_item);
$private = intval($acl->is_private() || $parent_item['item_private']);
$public_policy = $parent_item['public_policy'];
@@ -742,7 +760,12 @@ class Item extends Controller {
}
}
}
-
+
+ if(($str_contact_allow) && (! $str_group_allow)) {
+ // direct message - private between individual channels but not groups
+ $private = 2;
+ }
+
/**
*