Loading missed messages is working now. When a user enters a room for the second time (not the first time because then we get the 50 last messages) all the messages that have been missed are loading and displaying in the tableview. To do this we call in the didSelectRoom function the meteor method loadMissedMessages. The missed messages are saved in an array of ChatMessages, named unreadChatMessages, in order to reverse it and then add those messages in the chatMessageData dictionary where we keep all the chat messages for each room. After this the unreadChatMessages is being emptied.
Loading missed messages is working now. When a user enters a room for the second time (not the first time because then we get the 50 last messages) all the messages that have been missed are loading and displaying in the tableview. To do this we call in the didSelectRoom function the meteor method loadMissedMessages. The missed messages are saved in an array of ChatMessages, named unreadChatMessages, in order to reverse it and then add those messages in the chatMessageData dictionary where we keep all the chat messages for each room. After this the unreadChatMessages is being emptied.

legendecas/Rocket.Chat.iOS,RocketChat/Rocket.Chat.iOS,RocketChat/Rocket.Chat.iOS,haitran2011/Rocket.Chat.iOS,legendecas/Rocket.Chat.iOS,legendecas/Rocket.Chat.iOS,haitran2011/Rocket.Chat.iOS,haitran2011/Rocket.Chat.iOS,RocketChat/Rocket.Chat.iOS