From 1d9e0f17a6e945a10c05ad6543682ad1c8cd87d9 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Sun, 17 Sep 2017 18:40:32 -0700 Subject: more mastodon testing --- Zotlabs/Lib/ActivityStreams.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'Zotlabs') diff --git a/Zotlabs/Lib/ActivityStreams.php b/Zotlabs/Lib/ActivityStreams.php index 2846ea476..d9735881a 100644 --- a/Zotlabs/Lib/ActivityStreams.php +++ b/Zotlabs/Lib/ActivityStreams.php @@ -17,6 +17,7 @@ class ActivityStreams { public $ldsig = null; public $sigok = false; public $recips = null; + public $raw_recips = null; function __construct($string) { @@ -53,13 +54,21 @@ class ActivityStreams { return $this->valid; } + function set_recips($arr) { + $this->saved_recips = $arr; + } + function collect_recips($base = '',$namespace = 'https://www.w3.org/ns/activitystreams') { $x = []; $fields = [ 'to','cc','bto','bcc','audience']; foreach($fields as $f) { $y = $this->get_compound_property($f,$base,$namespace); - if($y) + if($y) { $x = array_merge($x,$y); + if(! is_array($this->raw_recips)) + $this->raw_recips = []; + $this->raw_recips[$f] = $x; + } } // not yet ready for prime time // $x = $this->expand($x,$base,$namespace); -- cgit v1.2.3