Putting the public inbox in the cc field creates an unlisted post in Mastodon. This software does not support unlisted so just make all public posts and replies public in Mastodon by putting the public inbox into the to field only.

This commit is contained in:
zotlabs 2019-12-05 15:55:45 -08:00
parent 4f4d1a22ba
commit a2f709b6f8

View file

@ -587,14 +587,8 @@ class Activity {
$top_level = (($reply) ? false : true);
if ($public) {
if ($top_level) {
$ret['to'] = [ ACTIVITY_PUBLIC_INBOX ];
$ret['cc'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
}
else {
$ret['to'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
$ret['cc'] = [ ACTIVITY_PUBLIC_INBOX ];
}
$ret['to'] = [ ACTIVITY_PUBLIC_INBOX ];
$ret['cc'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
}
else {
@ -850,14 +844,8 @@ class Activity {
$top_level = (($i['mid'] === $i['parent_mid']) ? true : false);
if ($public) {
if ($top_level) {
$ret['to'] = [ ACTIVITY_PUBLIC_INBOX ];
$ret['cc'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
}
else {
$ret['to'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
$ret['cc'] = [ ACTIVITY_PUBLIC_INBOX ];
}
$ret['to'] = [ ACTIVITY_PUBLIC_INBOX ];
$ret['cc'] = [ z_root() . '/followers/' . substr($i['author']['xchan_addr'],0,strpos($i['author']['xchan_addr'],'@')) ];
}
else {