aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-03-14 09:01:12 +0000
committerMario <mario@mariovavti.com>2021-03-15 08:49:53 +0000
commit4d3524ba9dd155d71969debc5c24198e8bd7b7a1 (patch)
tree5a6ed284c1cff4a9495d769346cc9c922e533231 /Zotlabs/Lib/Activity.php
parent29beea28c2604efcd10e4daa242d7e58bafe59d8 (diff)
downloadvolse-hubzilla-4d3524ba9dd155d71969debc5c24198e8bd7b7a1.tar.gz
volse-hubzilla-4d3524ba9dd155d71969debc5c24198e8bd7b7a1.tar.bz2
volse-hubzilla-4d3524ba9dd155d71969debc5c24198e8bd7b7a1.zip
mod subthread issue continued
(cherry picked from commit b6d30f67345f37dae8dfffd96b065e6139364bcd)
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 2dabfcceb..24fe5e5c0 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -376,6 +376,8 @@ class Activity {
$ret = [];
+
+
if ($i['verb'] === ACTIVITY_FRIEND) {
// Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
$objtype = 'Note';
@@ -719,7 +721,6 @@ class Activity {
$ret = [];
$reply = false;
-
if ($i['verb'] === ACTIVITY_FRIEND) {
// Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
$ret['obj'] = [];
@@ -2095,6 +2096,15 @@ class Activity {
static function decode_note($act) {
+ // Within our family of projects, Follow/Unfollow of a thread is an internal activity which should not be transmitted,
+ // hence if we receive it - ignore or reject it.
+ // Unfollow is not defined by ActivityStreams, which prefers Undo->Follow.
+ // This may have to be revisited if AP projects start using Follow for objects other than actors.
+
+ if (in_array($act->type, [ 'Follow', 'Unfollow' ])) {
+ return false;
+ }
+
$response_activity = false;
$s = [];