Browse Source

Limit /redir links to private posts

- This allows to share public post links with anonymous users
pull/10763/head
Hypolite Petovan 3 weeks ago
parent
commit
6836b1ea78
  1. 2
      include/conversation.php

2
include/conversation.php

@ -177,7 +177,7 @@ function localize_item(&$item)
// add sparkle links to appropriate permalinks
// Only create a redirection to a magic link when logged in
if (!empty($item['plink']) && Session::isAuthenticated()) {
if (!empty($item['plink']) && Session::isAuthenticated() && $item['private'] == Item::PRIVATE) {
$author = ['uid' => 0, 'id' => $item['author-id'],
'network' => $item['author-network'], 'url' => $item['author-link']];
$item['plink'] = Contact::magicLinkByContact($author, $item['plink']);

Loading…
Cancel
Save