diff options
author | zotlabs <mike@macgirvin.com> | 2019-07-11 20:47:38 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-07-11 20:47:38 -0700 |
commit | 39c0a7525b27fa2f8fff8a6d67104ed98acbf046 (patch) | |
tree | 44aaec0e94a5d30ec3cbc06534c7fda3a83c5c1d /Zotlabs/Lib | |
parent | 276ab3eae32458b019af9261b49acf31739ed09e (diff) | |
download | volse-hubzilla-39c0a7525b27fa2f8fff8a6d67104ed98acbf046.tar.gz volse-hubzilla-39c0a7525b27fa2f8fff8a6d67104ed98acbf046.tar.bz2 volse-hubzilla-39c0a7525b27fa2f8fff8a6d67104ed98acbf046.zip |
emoji reactions from hubzilla becoming top level posts on zap because of missing object
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index c70d5f4dc..8168e7354 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -487,6 +487,19 @@ class Activity { $ret['type'] = self::activity_mapper($i['verb']); + if($ret['type'] === 'emojiReaction') { + // There may not be an object for these items for legacy reasons - it should be the conversation parent. + $p = q("select * from item where mid = '%s' and uid = %d", + dbesc($i['parent_mid']), + intval($i['uid']) + ); + if($p) { + xchan_query($p,true); + $p = fetch_post_tags($p,true); + $i['obj'] = self::encode_item($p[0]); + } + } + $ret['id'] = ((strpos($i['mid'],'http') === 0) ? $i['mid'] : z_root() . '/activity/' . urlencode($i['mid'])); |