forked from mirrors/Fedilab
Fix issue #730
This commit is contained in:
parent
17d6152af3
commit
7e1d9b8910
1 changed files with 5 additions and 1 deletions
|
@ -270,7 +270,11 @@ public class ComposeWorker extends Worker {
|
|||
b.putBoolean(Helper.RECEIVE_COMPOSE_ERROR_MESSAGE, true);
|
||||
Intent intentBD = new Intent(Helper.INTENT_COMPOSE_ERROR_MESSAGE);
|
||||
b.putSerializable(Helper.ARG_STATUS_DRAFT, dataPost.statusDraft);
|
||||
b.putSerializable(Helper.RECEIVE_ERROR_MESSAGE, statusResponse.errorBody().string());
|
||||
String err = statusResponse.errorBody().string();
|
||||
if (err.contains("{\"error\":\"")) {
|
||||
err = err.replaceAll("\\{\"error\":\"(.*)\"}", "$1");
|
||||
}
|
||||
b.putSerializable(Helper.RECEIVE_ERROR_MESSAGE, err);
|
||||
intentBD.putExtras(b);
|
||||
LocalBroadcastManager.getInstance(context).sendBroadcast(intentBD);
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue