aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-01-09 08:20:01 +0000
committerMario <mario@mariovavti.com>2020-01-09 08:20:01 +0000
commit5c4301369235b7f03a4654e81ded6b9da3b98891 (patch)
treee00ef06580b8956d7246e94b6bc07e135ed2b52b
parent6add6ce79b731de63d3b401923fb26b9e265f956 (diff)
downloadvolse-hubzilla-5c4301369235b7f03a4654e81ded6b9da3b98891.tar.gz
volse-hubzilla-5c4301369235b7f03a4654e81ded6b9da3b98891.tar.bz2
volse-hubzilla-5c4301369235b7f03a4654e81ded6b9da3b98891.zip
deal with situations where we do not have an xchan_addr but only an xchan_url
-rw-r--r--include/conversation.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/conversation.php b/include/conversation.php
index e8b8051bb..a80adb933 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1010,11 +1010,11 @@ function thread_author_menu($item, $mode = '') {
$contact = App::$contacts[$item['author_xchan']];
}
else {
- if($local_channel && $item['author']['xchan_addr'] && (! in_array($item['author']['xchan_network'],[ 'rss', 'anon','unknown' ]))) {
- $follow_url = z_root() . '/follow/?f=&url=' . urlencode($item['author']['xchan_addr']) . '&interactive=0';
+ $url = (($item['author']['xchan_addr']) ? $item['author']['xchan_addr'] : $item['author']['xchan_url']);
+ if($local_channel && $url && (! in_array($item['author']['xchan_network'],[ 'rss', 'anon','unknown' ]))) {
+ $follow_url = z_root() . '/follow/?f=&url=' . urlencode($url) . '&interactive=0';
}
}
-
if($item['uid'] > 0 && author_is_pmable($item['author'],$contact)) {
$pm_url = z_root() . '/mail/new/?f=&hash=' . urlencode($item['author_xchan']);
}