From d9052c7e3cba157c1465125bcc5e1e0c9b98f8aa Mon Sep 17 00:00:00 2001 From: zotlabs Date: Tue, 3 Sep 2019 17:00:10 -0700 Subject: Zot -> Zot6 translation issue, liking a "new friend" activity --- Zotlabs/Lib/Activity.php | 24 +++++++++++++++++------- include/zot.php | 1 - 2 files changed, 17 insertions(+), 8 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'; diff --git a/include/zot.php b/include/zot.php index 60bada1d6..bd85dd755 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2392,7 +2392,6 @@ function process_mail_delivery($sender, $arr, $deliveries) { } } - $r = q("select id, conv_guid from mail where mid = '%s' and channel_id = %d limit 1", dbesc($arr['mid']), intval($channel['channel_id']) -- cgit v1.2.3