forked from friendica/friendica-addons
[various] Remove /display/{nick}/{id} URL structure publishing
This commit is contained in:
parent
246057726b
commit
09967cc664
3 changed files with 4 additions and 4 deletions
|
@ -254,7 +254,7 @@ function mailstream_subject($item) {
|
|||
return L10n::t("Friendica Item");
|
||||
}
|
||||
|
||||
function mailstream_send($a, $message_id, $item, $user) {
|
||||
function mailstream_send(\Friendica\App $a, $message_id, $item, $user) {
|
||||
if (!$item['visible']) {
|
||||
return;
|
||||
}
|
||||
|
@ -293,7 +293,7 @@ function mailstream_send($a, $message_id, $item, $user) {
|
|||
$mail->CharSet = 'utf-8';
|
||||
$template = Renderer::getMarkupTemplate('mail.tpl', 'addon/mailstream/');
|
||||
$item['body'] = BBCode::convert($item['body']);
|
||||
$item['url'] = $a->getBaseURL() . '/display/' . $user['nickname'] . '/' . $item['id'];
|
||||
$item['url'] = $a->getBaseURL() . '/display/' . $item['guid'];
|
||||
$mail->Body = Renderer::replaceMacros($template, [
|
||||
'$upstream' => L10n::t('Upstream'),
|
||||
'$local' => L10n::t('Local'),
|
||||
|
|
|
@ -735,7 +735,7 @@ function statusnet_prepare_body(App $a, &$b)
|
|||
}
|
||||
|
||||
$item = $b["item"];
|
||||
$item["plink"] = $a->getBaseURL() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
|
||||
$item["plink"] = $a->getBaseURL() . "/display/" . $item["guid"];
|
||||
|
||||
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
|
||||
$orig_post = Item::selectFirst(['author-link', 'uri'], $condition);
|
||||
|
|
|
@ -814,7 +814,7 @@ function twitter_prepare_body(App $a, array &$b)
|
|||
if ($b["preview"]) {
|
||||
$max_char = 280;
|
||||
$item = $b["item"];
|
||||
$item["plink"] = $a->getBaseURL() . "/display/" . $a->user["nickname"] . "/" . $item["parent"];
|
||||
$item["plink"] = $a->getBaseURL() . "/display/" . $item["guid"];
|
||||
|
||||
$condition = ['uri' => $item["thr-parent"], 'uid' => local_user()];
|
||||
$orig_post = Item::selectFirst(['author-link'], $condition);
|
||||
|
|
Loading…
Reference in a new issue