//logic to obtain messages and add to list using int to get a specific amount of messages
return messages;
}
This would mainly be helpful to devs on android. When rotating the screen you lose the listview containing all previous messages. Leaving and rejoining the room will do this but you have to leave everytime the screen is rotated.
XEP-45 does nut support retrieving the history after the initial presence has been send (see XEP-45 7.2.14). And this is already supported by Smack: MultiUserChat (smack 4.0.6 API)
My guess is that there is no need to retrieve the history after the join. You either request it with the initial presence or you are not interested in the history.