aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2019-09-10 10:40:53 +0200
committerMax Kostikov <max@kostikov.co>2019-09-10 10:40:53 +0200
commitf2b121cd58fd4884c09b3d0474f5ac4443d4b0e9 (patch)
tree9e005d0749246af8b30a30913194b2e20bc813f8 /Zotlabs
parentdcfe10b69118eab9795d234b68c6a310da97d383 (diff)
parentd9052c7e3cba157c1465125bcc5e1e0c9b98f8aa (diff)
downloadvolse-hubzilla-f2b121cd58fd4884c09b3d0474f5ac4443d4b0e9.tar.gz
volse-hubzilla-f2b121cd58fd4884c09b3d0474f5ac4443d4b0e9.tar.bz2
volse-hubzilla-f2b121cd58fd4884c09b3d0474f5ac4443d4b0e9.zip
Merge branch 'dev' into 'dev'
Zot -> Zot6 translation issue, liking a "new friend" activity See merge request hubzilla/core!1723
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Activity.php24
1 files changed, 17 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 721ed10fd..f9ec3a677 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -293,8 +293,14 @@ class Activity {
$ret = [];
- $objtype = self::activity_obj_mapper($i['obj_type']);
-
+ if($i['verb'] === ACTIVITY_FRIEND) {
+ // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
+ $objtype = 'Note';
+ }
+ else {
+ $objtype = self::activity_obj_mapper($i['obj_type']);
+ }
+
if(intval($i['item_deleted'])) {
$ret['type'] = 'Tombstone';
$ret['formerType'] = $objtype;
@@ -486,6 +492,12 @@ class Activity {
$ret = [];
$reply = false;
+
+ if($i['verb'] === ACTIVITY_FRIEND) {
+ // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
+ $ret['obj'] = [];
+ }
+
if(intval($i['item_deleted'])) {
$ret['type'] = 'Tombstone';
$ret['formerType'] = self::activity_obj_mapper($i['obj_type']);
@@ -498,11 +510,6 @@ class Activity {
return $ret;
}
- if($i['verb'] === ACTIVITY_FRIEND) {
- // Hubzilla 'make-friend' activity, no direct mapping from AS1 to AS2 - make it a note
- $ret['obj_type'] = ACTIVITY_OBJ_NOTE;
- $ret['obj'] = [];
- }
$ret['type'] = self::activity_mapper($i['verb']);
@@ -797,6 +804,9 @@ class Activity {
if(strpos($verb,ACTIVITY_MOOD) !== false)
return 'Create';
+ if(strpos($verb,ACTIVITY_FRIEND) !== false)
+ return 'Create';
+
if(strpos($verb,ACTIVITY_POKE) !== false)
return 'Activity';