I looked into that very briefly about a decade or so ago: it would be very difficult to get it done and maintained in practice. XMPP leans towards the "dumb server/smart client" side of the trade-off, while Telegram is the exact opposite: while an XMPP client establishes and maintains a session and its state, retrieves a list of discussions, for each, requests and processes new messages, and infers reas markers and counts (a bit like a traditional mail client like thunderbird), Telegram maintains the session and the client state on the server and the client is a thin layer to just display it.