aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php8
-rw-r--r--Zotlabs/Lib/Libzot.php4
-rw-r--r--Zotlabs/Module/Channel.php1
-rw-r--r--Zotlabs/Module/Display.php1
-rw-r--r--Zotlabs/Module/Hq.php1
-rw-r--r--Zotlabs/Module/Network.php6
-rw-r--r--Zotlabs/Module/Pubstream.php1
-rw-r--r--Zotlabs/Module/Search.php1
-rw-r--r--Zotlabs/Widget/Activity_filter.php14
9 files changed, 33 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index a99bb36e4..43315a87f 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1989,9 +1989,15 @@ class Activity {
$s['plink'] = $s['mid'];
}
- if($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
+ if ($act->recips && (! in_array(ACTIVITY_PUBLIC_INBOX,$act->recips)))
$s['item_private'] = 1;
+ if (is_array($act->obj)) {
+ if (array_key_exists('directMessage',$act->obj) && intval($act->obj['directMessage'])) {
+ $s['item_private'] = 2;
+ }
+ }
+
set_iconfig($s,'activitypub','recips',$act->raw_recips);
$parent = (($s['parent_mid'] && $s['parent_mid'] === $s['mid']) ? true : false);
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php
index 100d45c05..ad00aa97a 100644
--- a/Zotlabs/Lib/Libzot.php
+++ b/Zotlabs/Lib/Libzot.php
@@ -1220,8 +1220,8 @@ class Libzot {
$arr['owner_xchan'] = $env['sender'];
}
- if($private) {
- $arr['item_private'] = true;
+ if ($private && (! intval($arr['item_private']))) {
+ $arr['item_private'] = 1;
}
if ($arr['mid'] === $arr['parent_mid']) {
diff --git a/Zotlabs/Module/Channel.php b/Zotlabs/Module/Channel.php
index 5529db70e..170b81787 100644
--- a/Zotlabs/Module/Channel.php
+++ b/Zotlabs/Module/Channel.php
@@ -419,6 +419,7 @@ class Channel extends Controller {
'$nouveau' => '0',
'$wall' => '1',
'$fh' => '0',
+ '$dm' => '0',
'$static' => $static,
'$page' => ((App::$pager['page'] != 1) ? App::$pager['page'] : 1),
'$search' => $search,
diff --git a/Zotlabs/Module/Display.php b/Zotlabs/Module/Display.php
index cf38aba1a..777d183e1 100644
--- a/Zotlabs/Module/Display.php
+++ b/Zotlabs/Module/Display.php
@@ -224,6 +224,7 @@ class Display extends \Zotlabs\Web\Controller {
'$conv' => '0',
'$spam' => '0',
'$fh' => '0',
+ '$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
'$static' => $static,
diff --git a/Zotlabs/Module/Hq.php b/Zotlabs/Module/Hq.php
index d8c540fb9..5b331f4c1 100644
--- a/Zotlabs/Module/Hq.php
+++ b/Zotlabs/Module/Hq.php
@@ -179,6 +179,7 @@ class Hq extends \Zotlabs\Web\Controller {
'$conv' => '0',
'$spam' => '0',
'$fh' => '0',
+ '$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
'$static' => $static,
diff --git a/Zotlabs/Module/Network.php b/Zotlabs/Module/Network.php
index 1c16e34ef..a8efd0d9e 100644
--- a/Zotlabs/Module/Network.php
+++ b/Zotlabs/Module/Network.php
@@ -69,6 +69,7 @@ class Network extends \Zotlabs\Web\Controller {
$category = ((x($_REQUEST,'cat')) ? $_REQUEST['cat'] : '');
$hashtags = ((x($_REQUEST,'tag')) ? $_REQUEST['tag'] : '');
$verb = ((x($_REQUEST,'verb')) ? $_REQUEST['verb'] : '');
+ $dm = ((x($_REQUEST,'dm')) ? $_REQUEST['dm'] : 0);
$order = get_pconfig(local_channel(), 'mod_network', 'order', 0);
@@ -363,6 +364,7 @@ class Network extends \Zotlabs\Web\Controller {
'$conv' => (($conv) ? $conv : '0'),
'$spam' => (($spam) ? $spam : '0'),
'$fh' => '0',
+ '$dm' => (($dm) ? $dm : '0'),
'$nouveau' => (($nouveau) ? $nouveau : '0'),
'$wall' => '0',
'$static' => $static,
@@ -418,6 +420,10 @@ class Network extends \Zotlabs\Web\Controller {
if(strlen($file)) {
$sql_extra .= term_query('item',$file,TERM_FILE);
}
+
+ if ($dm) {
+ $sql_extra .= " AND item_private = 2 ";
+ }
if($conv) {
$item_thread_top = '';
diff --git a/Zotlabs/Module/Pubstream.php b/Zotlabs/Module/Pubstream.php
index 282c10989..92ef44696 100644
--- a/Zotlabs/Module/Pubstream.php
+++ b/Zotlabs/Module/Pubstream.php
@@ -144,6 +144,7 @@ class Pubstream extends \Zotlabs\Web\Controller {
'$conv' => '0',
'$spam' => '0',
'$fh' => '1',
+ '$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
'$list' => '0',
diff --git a/Zotlabs/Module/Search.php b/Zotlabs/Module/Search.php
index 214ece9a3..686afb2d2 100644
--- a/Zotlabs/Module/Search.php
+++ b/Zotlabs/Module/Search.php
@@ -128,6 +128,7 @@ class Search extends \Zotlabs\Web\Controller {
'$conv' => '0',
'$spam' => '0',
'$fh' => '0',
+ '$dm' => '0',
'$nouveau' => '0',
'$wall' => '0',
'$static' => $static,
diff --git a/Zotlabs/Widget/Activity_filter.php b/Zotlabs/Widget/Activity_filter.php
index 32ab10c77..84b9ec24a 100644
--- a/Zotlabs/Widget/Activity_filter.php
+++ b/Zotlabs/Widget/Activity_filter.php
@@ -15,8 +15,20 @@ class Activity_filter {
$filter_active = false;
$tabs = [];
+/* leave this commented out until ready for primetime
+ if(x($_GET,'dm')) {
+ $dm_active = (($_GET['dm'] == 1) ? 'active' : '');
+ $filter_active = 'dm';
+ }
-
+ $tabs[] = [
+ 'label' => t('Direct Messages'),
+ 'icon' => 'envelope-o',
+ 'url' => z_root() . '/' . $cmd . '/?f=&dm=1',
+ 'sel' => $dm_active,
+ 'title' => t('Show direct (private) messages')
+ ];
+*/
if(Apps::system_app_installed(local_channel(), 'Privacy Groups')) {
$groups = q("SELECT * FROM pgrp WHERE deleted = 0 AND uid = %d ORDER BY gname ASC",
intval(local_channel())