TMessage reply fix

This commit is contained in:
mrbesen 2019-02-07 03:44:59 +01:00
parent 1659af328f
commit 969400f9c7
Signed by: MrBesen
GPG Key ID: 596B2350DCD67504
1 changed files with 5 additions and 2 deletions

View File

@ -22,11 +22,11 @@ public class TMessage extends JSONBased {
throw new RuntimeException("not implemented");
}
public boolean reply(String msg) {
public boolean reply(String msg, TReplyMarkup rm) {
if(from == null) {
throw new RuntimeException("no from defined!");
} else {
return from.sendMessage(msg, null, message_id);
return TUser.sendMessage(api, chatid != 0 ? chatid : from.getID(), msg, rm, message_id);
}
// try {
// return api.request("sendMessage", "chat_id=" + from.getID() + "&text=" + msg + "&reply_to_message_id=" + message_id ).getBoolean("ok") ;
@ -35,6 +35,9 @@ public class TMessage extends JSONBased {
// return false;
// }
}
public boolean reply(String msg) {
return reply(msg, null);
}
public TMessage forward(TUser us) {
return forward(api, us.getID(), this);