When I try to get full information about chat (TLRequestMessagesGetFullChat), I get a deserialization error:
The same GetFull requests work fine for Channels and Users (but they also require access hashes).
It tries to cast TLChatInviteEmpty to TLChatInviteExported but not to TLAbsChatInvite.
int chatID = 0; // some chat ID here
TLRequestMessagesGetFullChat fullRequest = new TLRequestMessagesGetFullChat();
fullRequest.setChatId(chatID);
try {
TLAbsChatFull fullDialog = api.doRpcCall(fullRequest);
} catch (RpcException e) {
System.err.println(e.getErrorTag() + " " + e.getErrorCode());
} catch (TimeoutException | IOException e) {
System.err.println(e.getMessage());
}
Errors:
java.lang.ClassCastException: org.telegram.api.chat.invite.TLChatInviteEmpty cannot be cast to org.telegram.api.chat.invite.TLChatInviteExported
at org.telegram.api.chat.TLChatFull.deserializeBody(TLChatFull.java:83)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:118)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:134)
at org.telegram.tl.StreamingUtils.readTLObject(StreamingUtils.java:320)
at org.telegram.api.messages.TLMessagesChatFull.deserializeBody(TLMessagesChatFull.java:105)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:118)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:88)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:134)
at org.telegram.tl.StreamingUtils.readTLObject(StreamingUtils.java:320)
at org.telegram.api.functions.messages.TLRequestMessagesGetFullChat.deserializeResponse(TLRequestMessagesGetFullChat.java:37)
at org.telegram.api.functions.messages.TLRequestMessagesGetFullChat.deserializeResponse(TLRequestMessagesGetFullChat.java:16)
at org.telegram.tl.TLMethod.deserializeResponse(TLMethod.java:15)
at org.telegram.api.engine.TelegramApi$ProtoCallback.onRpcResult(TelegramApi.java:762)
at org.telegram.mtproto.MTProto.onMTProtoMessage(MTProto.java:395)
at org.telegram.mtproto.MTProto.onMTMessage(MTProto.java:258)
at org.telegram.mtproto.MTProto.access$1300(MTProto.java:45)
at org.telegram.mtproto.MTProto$ResponseProcessor.run(MTProto.java:766)
java.io.IOException: Unable to deserialize data #2e02a614 #771925524
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:128)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:134)
at org.telegram.tl.StreamingUtils.readTLObject(StreamingUtils.java:320)
at org.telegram.api.messages.TLMessagesChatFull.deserializeBody(TLMessagesChatFull.java:105)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:118)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:88)
at org.telegram.api.engine.TelegramApi$1.deserializeMessage(TelegramApi.java:114)
at org.telegram.tl.TLContext.deserializeMessage(TLContext.java:134)
at org.telegram.tl.StreamingUtils.readTLObject(StreamingUtils.java:320)
at org.telegram.api.functions.messages.TLRequestMessagesGetFullChat.deserializeResponse(TLRequestMessagesGetFullChat.java:37)
at org.telegram.api.functions.messages.TLRequestMessagesGetFullChat.deserializeResponse(TLRequestMessagesGetFullChat.java:16)
at org.telegram.tl.TLMethod.deserializeResponse(TLMethod.java:15)
at org.telegram.api.engine.TelegramApi$ProtoCallback.onRpcResult(TelegramApi.java:762)
at org.telegram.mtproto.MTProto.onMTProtoMessage(MTProto.java:395)
at org.telegram.mtproto.MTProto.onMTMessage(MTProto.java:258)
at org.telegram.mtproto.MTProto.access$1300(MTProto.java:45)
at org.telegram.mtproto.MTProto$ResponseProcessor.run(MTProto.java:766)
When I try to get full information about chat (TLRequestMessagesGetFullChat), I get a deserialization error:
The same GetFull requests work fine for Channels and Users (but they also require access hashes).
It tries to cast TLChatInviteEmpty to TLChatInviteExported but not to TLAbsChatInvite.
Errors: