aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-10-10 08:00:25 +0000
committerMario <mario@mariovavti.com>2020-10-10 08:00:25 +0000
commit595f3d99b4bd2618630f9a49423b29bfbfcbca41 (patch)
tree2a651f7d1fa863c6fce6b9c9cb374fc9348ecf95
parent1e2d5b0c779b8f3a623d4757a8e1a64e67491fb0 (diff)
downloadvolse-hubzilla-595f3d99b4bd2618630f9a49423b29bfbfcbca41.tar.gz
volse-hubzilla-595f3d99b4bd2618630f9a49423b29bfbfcbca41.tar.bz2
volse-hubzilla-595f3d99b4bd2618630f9a49423b29bfbfcbca41.zip
quickfix localize_item() - requires more work
-rw-r--r--Zotlabs/Lib/Activity.php2
-rw-r--r--include/conversation.php15
-rw-r--r--include/text.php2
3 files changed, 15 insertions, 4 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 13ba224cb..e3798415c 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -2921,7 +2921,7 @@ class Activity {
$s['parent_mid'] = $s['mid'];
- $post_type = (($parent_item['resource_type'] === 'photo') ? t('photo') : t('status'));
+ $post_type = (($parent_item['resource_type'] === 'photo') ? t('photo') : t('post'));
$links = array(array('rel' => 'alternate','type' => 'text/html', 'href' => $parent_item['plink']));
$objtype = (($parent_item['resource_type'] === 'photo') ? ACTIVITY_OBJ_PHOTO : ACTIVITY_OBJ_NOTE );
diff --git a/include/conversation.php b/include/conversation.php
index b43a6f47e..c8c36f241 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -104,20 +104,30 @@ function localize_item(&$item){
if($obj['author'] && $obj['author']['link'])
$author_link = get_rel_link($obj['author']['link'],'alternate');
+ elseif($obj['actor'] && $obj['actor']['url'])
+ $author_link = $obj['actor']['url'][0]['href'];
else
$author_link = '';
$author_name = (($obj['author'] && $obj['author']['name']) ? $obj['author']['name'] : '');
+ if(!$author_name)
+ $author_name = (($obj['actor'] && $obj['actor']['name']) ? $obj['actor']['name'] : '');
+
$item_url = get_rel_link($obj['link'],'alternate');
+ if(!$item_url)
+ $item_url = $obj['id'];
+
$Bphoto = '';
switch($obj['type']) {
case ACTIVITY_OBJ_PHOTO:
+ case 'Photo':
$post_type = t('photo');
break;
case ACTIVITY_OBJ_EVENT:
+ case 'Event':
$post_type = t('event');
break;
case ACTIVITY_OBJ_PERSON:
@@ -142,9 +152,10 @@ function localize_item(&$item){
break;
case ACTIVITY_OBJ_NOTE:
+ case 'Note':
default:
- $post_type = t('status');
- if($obj['id'] != $obj['parent'])
+ $post_type = t('post');
+ if(($obj['parent'] && $obj['id'] != $obj['parent']) || $obj['inReplyTo'])
$post_type = t('comment');
break;
}
diff --git a/include/text.php b/include/text.php
index e798bf8f8..8bad8337f 100644
--- a/include/text.php
+++ b/include/text.php
@@ -2236,7 +2236,7 @@ function item_post_type($item) {
$post_type = t('event');
break;
default:
- $post_type = t('status');
+ $post_type = t('post');
if($item['mid'] != $item['parent_mid'])
$post_type = t('comment');
break;