The client would have to fetch all your messages first. Some rooms can have thousands of messages a day, and some people are in thousands of rooms [1] (though these are core developers so they might be stress testing)
[1]: https://news.ycombinator.com/item?id=32021303