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.

This commit is contained in:
Jean Baptiste Favre 2012-09-06 11:11:33 -04:00
parent 1b39f89b96
commit ec072e0af7

View File

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