diff options
author | Mario <mario@mariovavti.com> | 2019-07-12 13:00:14 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-07-12 13:00:14 +0200 |
commit | e5370971d6c7c554cafd84403e14037e6082317f (patch) | |
tree | e28a4a66c1279b100e64b300066b8e1df827fa82 /Zotlabs | |
parent | 090d9210062e1ab5a666210551eed30a61fd609c (diff) | |
parent | 39c0a7525b27fa2f8fff8a6d67104ed98acbf046 (diff) | |
download | volse-hubzilla-e5370971d6c7c554cafd84403e14037e6082317f.tar.gz volse-hubzilla-e5370971d6c7c554cafd84403e14037e6082317f.tar.bz2 volse-hubzilla-e5370971d6c7c554cafd84403e14037e6082317f.zip |
Merge branch 'dev' into 'dev'
emoji reactions from hubzilla becoming top level posts on zap because of missing object
See merge request hubzilla/core!1689
Diffstat (limited to 'Zotlabs')
-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'])); |