i am using this library to create a Telegram messenger and i work nice but now i want to sent a message to a contact witch has a photo as content of message. i am using this code snippet :
TLInputPhoto p = new TLInputPhoto() ;
TLInputMediaPhoto photo = new TLInputMediaPhoto() ;
photo.setId(p);
try {
File file = new File("d:\\test.jpg") ;
InputStream input = new FileInputStream(file) ;
photo.deserialize(input,api.getApiContext());
}catch (Exception ex){
System.out.println(ex.getMessage());
}
api.doRpcCall(new TLRequestMessagesSendMedia(new TLInputPeerContact(u.getUserId()),photo,123564789)) ;
String s = "" ;
but i am getting wrong classid exception.
how can i do this job?
i am using this library to create a Telegram messenger and i work nice but now i want to sent a message to a contact witch has a photo as content of message. i am using this code snippet :
but i am getting wrong classid exception. how can i do this job?