{"action":"created","issue":{"url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/432","repository_url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk","labels_url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/432/labels{/name}","comments_url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/432/comments","events_url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/432/events","html_url":"https://github.com/QuickBlox/quickblox-ios-sdk/issues/432","id":154213169,"number":432,"title":"Getting unreadMessages to mark it as read question.","user":{"login":"matrosovDev","id":4507851,"avatar_url":"https://avatars.githubusercontent.com/u/4507851?v=3","gravatar_id":"","url":"https://api.github.com/users/matrosovDev","html_url":"https://github.com/matrosovDev","followers_url":"https://api.github.com/users/matrosovDev/followers","following_url":"https://api.github.com/users/matrosovDev/following{/other_user}","gists_url":"https://api.github.com/users/matrosovDev/gists{/gist_id}","starred_url":"https://api.github.com/users/matrosovDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matrosovDev/subscriptions","organizations_url":"https://api.github.com/users/matrosovDev/orgs","repos_url":"https://api.github.com/users/matrosovDev/repos","events_url":"https://api.github.com/users/matrosovDev/events{/privacy}","received_events_url":"https://api.github.com/users/matrosovDev/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-05-11T10:44:45Z","updated_at":"2016-05-11T15:41:15Z","closed_at":null,"body":"Hey guys!) I've played with demo project, I have question regarding ChatViewController and unreadMessages.\r\n\r\nSo we have two delegate callbacks:\r\n`func chatServiceChatDidConnect(chatService: QMChatService)`\r\n`func chatServiceChatDidReconnect(chatService: QMChatService)`\r\n\r\nwhere we call `func refreshAndReadMessages()` and we call `func readMessages(messages: [QBChatMessage])` right after that with passing messages to read which is unread.\r\n\r\nI searched trough the demo project and there is only one place where we setup unreadMessages and this is in the same function `func readMessages(messages: [QBChatMessage])` and my question is why we get messages from `self.unreadMessages` and then passing it to `func readMessages(messages: [QBChatMessage])` and then again set it to `self.unreadMessages` if chat is not connected.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/comments/218499363","html_url":"https://github.com/QuickBlox/quickblox-ios-sdk/issues/432#issuecomment-218499363","issue_url":"https://api.github.com/repos/QuickBlox/quickblox-ios-sdk/issues/432","id":218499363,"user":{"login":"WillsAtIOS","id":19212162,"avatar_url":"https://avatars.githubusercontent.com/u/19212162?v=3","gravatar_id":"","url":"https://api.github.com/users/WillsAtIOS","html_url":"https://github.com/WillsAtIOS","followers_url":"https://api.github.com/users/WillsAtIOS/followers","following_url":"https://api.github.com/users/WillsAtIOS/following{/other_user}","gists_url":"https://api.github.com/users/WillsAtIOS/gists{/gist_id}","starred_url":"https://api.github.com/users/WillsAtIOS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WillsAtIOS/subscriptions","organizations_url":"https://api.github.com/users/WillsAtIOS/orgs","repos_url":"https://api.github.com/users/WillsAtIOS/repos","events_url":"https://api.github.com/users/WillsAtIOS/events{/privacy}","received_events_url":"https://api.github.com/users/WillsAtIOS/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T15:41:15Z","updated_at":"2016-05-11T15:41:15Z","body":"If you want to know the status of any message you should MessageStatusStringBuilder.h  and MessageStatusStringBuilder.m and this you can handle where ever you want to know the status of the message. Once go through this you will find these classes in sample-chat application provided in quickblox. I hope it is clear."}}