diff options
author | zotlabs <mike@macgirvin.com> | 2018-05-09 21:08:12 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2018-05-09 21:08:12 -0700 |
commit | b4be1da91eadb3fffbee5ea526790d1b68c4d38a (patch) | |
tree | 2b3bc95c29b7252ae822b2ef5fde29c58ad508cd /include/conversation.php | |
parent | d41556a1ea45fe3ef86f6d9d129c8b0d98ee3f2f (diff) | |
download | volse-hubzilla-b4be1da91eadb3fffbee5ea526790d1b68c4d38a.tar.gz volse-hubzilla-b4be1da91eadb3fffbee5ea526790d1b68c4d38a.tar.bz2 volse-hubzilla-b4be1da91eadb3fffbee5ea526790d1b68c4d38a.zip |
thread_author_menu - add some more checks as to whether to show certain links. This should complete work on hubzilla issue #1052
Diffstat (limited to 'include/conversation.php')
-rw-r--r-- | include/conversation.php | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/include/conversation.php b/include/conversation.php index 97dd402fc..4eabf7783 100644 --- a/include/conversation.php +++ b/include/conversation.php @@ -1001,18 +1001,21 @@ function thread_author_menu($item, $mode = '') { $profile_link = chanlink_hash($item['author_xchan']); $contact = false; - if(App::$contacts && array_key_exists($item['author_xchan'],App::$contacts)) - $contact = App::$contacts[$item['author_xchan']]; - else - if($local_channel && $item['author']['xchan_addr']) - $follow_url = z_root() . '/follow/?f=&url=' . urlencode($item['author']['xchan_addr']) . '&interactive=0'; - + if($channel['channel_hash'] !== $item['author_xchan']) { + if(App::$contacts && array_key_exists($item['author_xchan'],App::$contacts)) { + $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'; + } + } - if($item['uid'] > 0 && author_is_pmable($item['author'],$contact)) { - $pm_url = z_root() . '/mail/new/?f=&hash=' . urlencode($item['author_xchan']); + if($item['uid'] > 0 && author_is_pmable($item['author'],$contact)) { + $pm_url = z_root() . '/mail/new/?f=&hash=' . urlencode($item['author_xchan']); + } } - if($contact) { $poke_link = z_root() . '/poke/?f=&c=' . $contact['abook_id']; if (! intval($contact['abook_self'])) |