it would probably be easier to take an existing matrix client implementation and make it look like telegram.
i don’t think the ui will be much of a problem, the backend stuff: communication with the server, enryption, device validation will probably be the most complicated to implement.
But if you do it, I’d probably try it. The existing matrix clients are all not very good.
I’ve never used swipe typing, so my data is probably garbage, but its kinda fun.