diff options
author | Mario <mario@mariovavti.com> | 2019-05-03 08:36:58 +0200 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2019-05-03 08:36:58 +0200 |
commit | 6da4dfe605cc5dcffaf14f53549a61c0240e31bf (patch) | |
tree | 3107de4b8f3ac28e65c2896fecb7e4245bf8da0a /Zotlabs/Lib | |
parent | b35961c53cde75b133411882e35c76ef4ffd35f3 (diff) | |
parent | 7b4cb31a10a3ad4b9c0c671014074362fa19cb6c (diff) | |
download | volse-hubzilla-6da4dfe605cc5dcffaf14f53549a61c0240e31bf.tar.gz volse-hubzilla-6da4dfe605cc5dcffaf14f53549a61c0240e31bf.tar.bz2 volse-hubzilla-6da4dfe605cc5dcffaf14f53549a61c0240e31bf.zip |
Merge branch 'unfriend_delete_posts_bug' into 'dev'
Unfriend delete posts bug
See merge request hubzilla/core!1624
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Activity.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 12194664b..9d11cc201 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -566,6 +566,7 @@ class Activity { return []; } + if($i['target']) { if(! is_array($i['target'])) { $i['target'] = json_decode($i['target'],true); @@ -710,7 +711,7 @@ class Activity { // Reactions will just map to normal activities if(strpos($verb,ACTIVITY_REACT) !== false) - return 'Create'; + return 'emojiReaction'; if(strpos($verb,ACTIVITY_MOOD) !== false) return 'Create'; @@ -1486,7 +1487,7 @@ class Activity { } - if(in_array($act->type, [ 'Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept' ])) { + if(in_array($act->type, [ 'Like', 'Dislike', 'Flag', 'Block', 'Announce', 'Accept', 'Reject', 'TentativeAccept', 'emojiReaction' ])) { $response_activity = true; @@ -1527,6 +1528,9 @@ class Activity { if($act->type === 'Announce') { $content['content'] = sprintf( t('🔁 Repeated %1$s\'s %2$s'), $mention, $act->obj['type']); } + if ($act->type === 'emojiReaction') { + $content['content'] = (($act->tgt && $act->tgt['type'] === 'Image') ? '[img=32x32]' . $act->tgt['url'] . '[/img]' : '&#x' . $act->tgt['name'] . ';'); + } } if(! $s['created']) |