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
8cc4660bd9
commit
6387e0a90d
|
@ -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