aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-07-19 12:52:41 +0000
committerMario <mario@mariovavti.com>2023-07-19 12:52:41 +0000
commit7200c716736d879501a665c9797ccf9e0131b24c (patch)
tree6d72914b0378f23d9f24190fb196a84123e5e875 /Zotlabs
parent330add963dbe2195e0613f35b8f63c15eee585a0 (diff)
downloadvolse-hubzilla-7200c716736d879501a665c9797ccf9e0131b24c.tar.gz
volse-hubzilla-7200c716736d879501a665c9797ccf9e0131b24c.tar.bz2
volse-hubzilla-7200c716736d879501a665c9797ccf9e0131b24c.zip
ignore internal follow activity
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Sse_bs.php24
-rw-r--r--Zotlabs/Widget/Messages.php6
2 files changed, 17 insertions, 13 deletions
diff --git a/Zotlabs/Module/Sse_bs.php b/Zotlabs/Module/Sse_bs.php
index 970c482a9..a3a3afd23 100644
--- a/Zotlabs/Module/Sse_bs.php
+++ b/Zotlabs/Module/Sse_bs.php
@@ -169,12 +169,12 @@ class Sse_bs extends Controller {
$sql_extra2 = '';
if(self::$xchans)
- $sql_extra2 = " AND CASE WHEN verb = '" . ACTIVITY_SHARE . "' THEN owner_xchan ELSE author_xchan END IN (" . self::$xchans . ") ";
+ $sql_extra2 = " AND CASE WHEN verb = '" . dbesc(ACTIVITY_SHARE) . "' THEN owner_xchan ELSE author_xchan END IN (" . self::$xchans . ") ";
$item_normal = item_normal();
- // FEP-5624 filter approvals for comments
- $approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
+ // Filter FEP-5624 approvals for comments and internal follow activities
+ $item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -184,7 +184,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
- $approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -258,8 +257,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
- // FEP-5624 filter approvals for comments
- $approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
+ // Filter FEP-5624 approvals for comments and internal follow activities
+ $item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -269,7 +268,6 @@ class Sse_bs extends Controller {
AND obj_type NOT IN ('Document', 'Video', 'Audio', 'Image')
AND author_xchan != '%s'
$item_normal
- $approvals
$sql_extra
$sql_extra2
ORDER BY created DESC LIMIT $limit OFFSET $offset",
@@ -343,8 +341,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
- // FEP-5624 filter approvals for comments
- $approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
+ // Filter FEP-5624 approvals for comments and internal follow activities
+ $item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -445,8 +443,8 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
- // FEP-5624 filter approvals for comments
- $approvals = " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject') ";
+ // Filter FEP-5624 approvals for comments and internal follow activities
+ $item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
if ($notifications) {
$items = q("SELECT * FROM item
@@ -641,6 +639,10 @@ class Sse_bs extends Controller {
$item_normal = item_normal();
+ // Filter FEP-5624 approvals for comments and internal follow activities
+ $item_normal .= " AND verb NOT IN ('" . dbesc(ACTIVITY_ATTEND) . "', 'Accept', '" . dbesc(ACTIVITY_ATTENDNO) . "', 'Reject', '" . dbesc(ACTIVITY_FOLLOW) . "') ";
+
+
$r = q("SELECT * FROM item
WHERE verb = '%s'
AND obj_type IN ('Document', 'Video', 'Audio', 'Image')
diff --git a/Zotlabs/Widget/Messages.php b/Zotlabs/Widget/Messages.php
index 0a8900c4f..cdd889121 100644
--- a/Zotlabs/Widget/Messages.php
+++ b/Zotlabs/Widget/Messages.php
@@ -60,8 +60,10 @@ class Messages {
}
$channel = App::get_channel();
- $item_normal_i = str_replace('item.', 'i.', item_normal());
- $item_normal_c = str_replace('item.', 'c.', item_normal());
+ $item_normal = item_normal();
+ $item_normal .= " and item.verb != '" . ACTIVITY_FOLLOW . "'";
+ $item_normal_i = str_replace('item.', 'i.', $item_normal);
+ $item_normal_c = str_replace('item.', 'c.', $item_normal);
$entries = [];
$limit = 30;
$dummy_order_sql = '';