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:
parent
1b39f89b96
commit
ec072e0af7
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user