diff options
author | zotlabs <mike@macgirvin.com> | 2019-05-02 21:19:15 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-05-02 21:19:15 -0700 |
commit | 03ce4d7e2be8a2b1e9327bdd7d86937025b8d24b (patch) | |
tree | 3f30005a9c16dfad2b02dc9dcb751a10cf93c81a | |
parent | 76757ad1f263fc2da10cd774070d0899f7c317b3 (diff) | |
parent | f55f5fa92a60c27bc14069d8046cf26550ec5053 (diff) | |
download | volse-hubzilla-03ce4d7e2be8a2b1e9327bdd7d86937025b8d24b.tar.gz volse-hubzilla-03ce4d7e2be8a2b1e9327bdd7d86937025b8d24b.tar.bz2 volse-hubzilla-03ce4d7e2be8a2b1e9327bdd7d86937025b8d24b.zip |
Merge branch 'dev' of ../hz into dev
-rw-r--r-- | Zotlabs/Lib/Activity.php | 4 | ||||
-rw-r--r-- | Zotlabs/Module/React.php | 8 |
2 files changed, 12 insertions, 0 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 83c8790df..0f34a60c5 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); @@ -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']) diff --git a/Zotlabs/Module/React.php b/Zotlabs/Module/React.php index 3920301f5..f80b04a3f 100644 --- a/Zotlabs/Module/React.php +++ b/Zotlabs/Module/React.php @@ -59,6 +59,14 @@ class React extends \Zotlabs\Web\Controller { $n['body'] = "\n\n[zmg=32x32]" . z_root() . '/images/emoji/' . $emoji . '.png[/zmg]' . "\n\n"; $n['author_xchan'] = $channel['channel_hash']; + $n['tgt_type'] = 'Image'; + $n['target'] = [ + 'type' => 'Image', + 'name' => $emoji, + 'url' => z_root() . '/images/emoji/' . $emoji . '.png' + ]; + + $x = item_store($n); retain_item($postid); |