added sendImage
This commit is contained in:
parent
facdc8635c
commit
eaaf6c506b
|
@ -104,6 +104,19 @@ public class TUser {
|
|||
}
|
||||
}
|
||||
|
||||
public void sendImage(String caption, String url) {
|
||||
try {
|
||||
String cap = "";
|
||||
if(caption != null) {
|
||||
if(!caption.isEmpty())
|
||||
cap = "&caption=" + caption;
|
||||
}
|
||||
api.request("sendPhoto", "chat_id" + id + cap + "&photo=" + url);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object user) {
|
||||
if(user instanceof TUser) {
|
||||
|
|
Loading…
Reference in New Issue