messages

Requests to get all messages in this channel.

Messages retrieved by this function will be emitted in chronological order (oldest -> newest). Unrestricted consumption of the returned Flow is a potentially performance-intensive operation, it is thus recommended limiting the amount of messages requested by using Flow.take, Flow.takeWhile or other functions that limit the amount of messages requested.

channel.getMessagesBefore(newer.id).takeWhile { it.id older.id }

The returned flow is lazily executed, any RequestException will be thrown on terminal operators instead.