diff options
author | zotlabs <mike@macgirvin.com> | 2018-12-03 20:09:57 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-12-03 20:09:57 -0800 |
commit | 42aeb19562b9e72436a72e090772da669e34fd66 (patch) | |
tree | bd093718181c69fbb6f6f383c36548b60b23c262 /Zotlabs/Lib/Activity.php | |
parent | ffc3dba6825933d8e3ddc1a9a1ee93785acb2fca (diff) | |
download | volse-hubzilla-42aeb19562b9e72436a72e090772da669e34fd66.tar.gz volse-hubzilla-42aeb19562b9e72436a72e090772da669e34fd66.tar.bz2 volse-hubzilla-42aeb19562b9e72436a72e090772da669e34fd66.zip |
partial solution for obj|tgt multiple (zot and zot6) encodings; the zot6 version will be stored under $item['obj']['asld']
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 21c96fe62..8cef41c42 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -11,9 +11,15 @@ class Activity { static function encode_object($x) { + if(($x) && (! is_array($x)) && (substr(trim($x),0,1)) === '{' ) { $x = json_decode($x,true); } + + if(is_array($x) && array_key_exists('asld',$x)) { + $x = $x['asld']; + } + if($x['type'] === ACTIVITY_OBJ_PERSON) { return self::fetch_person($x); } |