We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 2c5aeb11 authored by Brion Vibber's avatar Brion Vibber

Include long-form attachment URL in notice if URL shortening is disabled.

Previously, the attachment URL would simply be dropped when shortening returned false instead of a short URL... the attachment was present if you clicked through to notice details but didn't appear in the timeline, making it nigh-impossible to see the attachment.
parent 834ac7aa
......@@ -239,6 +239,10 @@ class NewnoticeAction extends Action
$this->maybeAddRedir($fileRecord->id, $fileurl);
$short_fileurl = common_shorten_url($fileurl);
if (!$short_fileurl) {
// todo -- Consider forcing default shortener if none selected?
$short_fileurl = $fileurl;
$content_shortened .= ' ' . $short_fileurl;
if (mb_strlen($content_shortened) > 140) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment