Deepthought icon indicating copy to clipboard operation
Deepthought copied to clipboard

New channel message logic im UpdatesHandlerBase

Open pmouraguedes opened this issue 7 years ago • 0 comments

Hi,

I'm trying to receive new messages sent to a channel in my plugin. Each time a new message is sent I see that UpdatesHandlerBase.onTLUpdateChannelNewMessage is invoked. However, onTLUpdateChannelNewMessageCustom is never called because user from message is missing (no from id) on channel messages:

if (isUserFromMessageMissing(update.getMessage(), false)) { ... } else { onTLUpdateChannelNewMessageCustom(update); } Also this method is private and UpdatesHandlerBase.processUpdate is final, which means I cannot change this behavior.

I would appreciate to hear your recommendations about how to workaround this issue in order to be able to have onTLUpdateChannelNewMessageCustom called on the consumer side.

Thanks

pmouraguedes avatar Feb 23 '18 07:02 pmouraguedes