aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/ActivityStreams.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-20 09:34:00 +0000
committerMario <mario@mariovavti.com>2020-04-20 09:34:00 +0000
commit244936b0fd3ac60defa9fa6042e6ee3be869721c (patch)
tree298ae3ea65af63028fb7fd22880569317276fb1a /Zotlabs/Lib/ActivityStreams.php
parentf430a24fa38ea9d47d2916243e33d61b08f50f0f (diff)
downloadvolse-hubzilla-244936b0fd3ac60defa9fa6042e6ee3be869721c.tar.gz
volse-hubzilla-244936b0fd3ac60defa9fa6042e6ee3be869721c.tar.bz2
volse-hubzilla-244936b0fd3ac60defa9fa6042e6ee3be869721c.zip
some work on improving federation of item_private and make sure we deal with an array in array_path_exists()
Diffstat (limited to 'Zotlabs/Lib/ActivityStreams.php')
-rw-r--r--Zotlabs/Lib/ActivityStreams.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php
index d8bd72943..b1ef59364 100644
--- a/Zotlabs/Lib/ActivityStreams.php
+++ b/Zotlabs/Lib/ActivityStreams.php
@@ -146,15 +146,20 @@ class ActivityStreams {
*/
function collect_recips($base = '', $namespace = '') {
$x = [];
+
$fields = [ 'to', 'cc', 'bto', 'bcc', 'audience'];
foreach($fields as $f) {
$y = $this->get_compound_property($f, $base, $namespace);
if($y) {
- $x = array_merge($x, $y);
- if(! is_array($this->raw_recips))
+ if (! is_array($this->raw_recips)) {
$this->raw_recips = [];
+ }
- $this->raw_recips[$f] = $x;
+ if (! is_array($y)) {
+ $y = [ $y ];
+ }
+ $this->raw_recips[$f] = $y;
+ $x = array_merge($x, $y);
}
}
// not yet ready for prime time
@@ -411,4 +416,4 @@ class ActivityStreams {
}
-} \ No newline at end of file
+}