change if clause in AbsSender.sendAudio() that checks if the response contains a positive 'ok'
This commit is contained in:
parent
334b25b296
commit
ac18b952b9
@ -520,7 +520,8 @@ public abstract class AbsSender {
|
|||||||
|
|
||||||
JSONObject jsonObject = new JSONObject(responseContent);
|
JSONObject jsonObject = new JSONObject(responseContent);
|
||||||
|
|
||||||
if(jsonObject.has("result")){
|
//if we got an ok, then we can expect a "reseult" section. and out of this can a new Message object be built
|
||||||
|
if(jsonObject.has("ok") && jsonObject.getBoolean("ok")){
|
||||||
return new Message(jsonObject.getJSONObject("result"));
|
return new Message(jsonObject.getJSONObject("result"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user