aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-05-03 08:36:58 +0200
committerMario <mario@mariovavti.com>2019-05-03 08:36:58 +0200
commit6da4dfe605cc5dcffaf14f53549a61c0240e31bf (patch)
tree3107de4b8f3ac28e65c2896fecb7e4245bf8da0a /Zotlabs/Lib
parentb35961c53cde75b133411882e35c76ef4ffd35f3 (diff)
parent7b4cb31a10a3ad4b9c0c671014074362fa19cb6c (diff)
downloadvolse-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.php8
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('&#x1f501; 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'])