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

Commit 6387e0a9 authored by Jean Baptiste Favre's avatar Jean Baptiste Favre

Notice update with media attachment may fail through API when status text +...

Notice update with media attachment may fail through API when status text + attachment length get higher than max notice length. Calling URL shortener can make global length less than maxlength, though allowing notice update.
parent 8cc4660b
......@@ -300,6 +300,9 @@ class ApiStatusesUpdateAction extends ApiAuthAction
if (isset($upload)) {
$status_shortened .= ' ' . $upload->shortUrl();
//JBTEST
$status_shortened = $this->auth_user->shortenlinks($status_shortened);
//JBTEST
if (Notice::contentTooLong($status_shortened)) {
$upload->delete();
......
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