Commit 7e1d9b89 authored by Thomas's avatar Thomas
Browse files

Fix issue #730

parent 17d6152a
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;