diff options
author | Mario <mario@mariovavti.com> | 2023-02-22 10:47:11 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-02-22 10:47:11 +0000 |
commit | 352713726414d2e1dac1c06040bedbb84bb77db6 (patch) | |
tree | 76eb6dde63f69c3444fa2e331fc6f639d9d50106 /Zotlabs/Lib/Activity.php | |
parent | e045a36559dfa6d686f0ef6086a585683c6956ad (diff) | |
download | volse-hubzilla-352713726414d2e1dac1c06040bedbb84bb77db6.tar.gz volse-hubzilla-352713726414d2e1dac1c06040bedbb84bb77db6.tar.bz2 volse-hubzilla-352713726414d2e1dac1c06040bedbb84bb77db6.zip |
Activity: set xchan_pubforum if we deal with a group actor
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 68ac320ba..a17648147 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1691,6 +1691,8 @@ class Activity { } } + $group_actor = ($person_obj['type'] === 'Group'); + $r = q("select * from xchan join hubloc on xchan_hash = hubloc_hash where xchan_hash = '%s'", dbesc($url) ); @@ -1709,11 +1711,12 @@ class Activity { ); // update existing xchan record - q("update xchan set xchan_name = '%s', xchan_pubkey = '%s', xchan_addr = '%s', xchan_network = 'activitypub', xchan_name_date = '%s' where xchan_hash = '%s'", + q("update xchan set xchan_name = '%s', xchan_pubkey = '%s', xchan_addr = '%s', xchan_network = 'activitypub', xchan_name_date = '%s', xchan_pubforum = %d where xchan_hash = '%s'", dbesc(escape_tags($name)), dbesc(escape_tags($pubkey)), dbesc(escape_tags($webfinger_addr)), dbescdate(datetime_convert()), + intval($group_actor), dbesc($url) ); @@ -1740,7 +1743,8 @@ class Activity { 'xchan_url' => $profile, 'xchan_name' => escape_tags($name), 'xchan_name_date' => datetime_convert(), - 'xchan_network' => 'activitypub' + 'xchan_network' => 'activitypub', + 'xchan_pubforum' => intval($group_actor) ] ); @@ -2219,7 +2223,6 @@ class Activity { ) { return false; } - // 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. |