editCaption with KB
This commit is contained in:
parent
077017f590
commit
8b67f1d8a2
|
@ -29,6 +29,7 @@ import de.mrbesen.telegram.log.SimpleLog;
|
|||
import de.mrbesen.telegram.objects.JSONBased.Member;
|
||||
import de.mrbesen.telegram.objects.TAudio;
|
||||
import de.mrbesen.telegram.objects.TMessage;
|
||||
import de.mrbesen.telegram.objects.TReplyMarkup;
|
||||
import de.mrbesen.telegram.objects.TUser;
|
||||
import de.mrbesen.telegram.objects.TUser.Status;
|
||||
|
||||
|
@ -178,9 +179,12 @@ public class TelegramAPI implements Runnable {
|
|||
}).start();
|
||||
}
|
||||
|
||||
public void updateCaption(final String newCaption, int chatid, int msg_id, boolean async, Callback<JSONObject, ?> clb) {
|
||||
public void updateCaption(final String newCaption, int chatid, int msg_id, TReplyMarkup rm, boolean async, Callback<JSONObject, ?> clb) {
|
||||
try {
|
||||
String q = "chat_id=" + chatid + "&message_id=" + msg_id + "&caption=" + URLEncoder.encode(newCaption, "UTF-8");
|
||||
String rply = "";
|
||||
if(rm != null)
|
||||
rply = "&reply_markup=" + URLEncoder.encode(rm.toJSONString(), "UTF-8");
|
||||
String q = "chat_id=" + chatid + "&message_id=" + msg_id + "&caption=" + URLEncoder.encode(newCaption, "UTF-8") + rply;
|
||||
if(async) {
|
||||
this.async.enque("editMessageCaption", q);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue