From ec072e0af7267b772d25c586881661af0d3e2bcb Mon Sep 17 00:00:00 2001 From: Jean Baptiste Favre Date: Thu, 6 Sep 2012 11:11:33 -0400 Subject: [PATCH] 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. --- actions/apistatusesupdate.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/actions/apistatusesupdate.php b/actions/apistatusesupdate.php index b0f3527160..0385b01961 100644 --- a/actions/apistatusesupdate.php +++ b/actions/apistatusesupdate.php @@ -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();