Merge pull request #851 from MrPetovan/task/remove-friendica-app-support

[various] Remove /display/{nick}/{id} URL structure publishing
This commit is contained in:
Michael Vogel 2019-05-06 08:03:16 +02:00 committed by GitHub
commit 25b748f9ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -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'),

View file

@ -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);

View file

@ -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);