-
Notifications
You must be signed in to change notification settings - Fork 360
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Message ID is 0 #13
Comments
Try to use 'date_sent' field and request only messages from history where 'date_sent' > last message's date from 'chatDidReceiveMessage' |
We are already using 'date_sent' to fetch the history. But the problem is, suppose we send a request to fetch history records > 'date_sent'. But before we receive the response, we receive a new message through 'chatDidReceiveMessage'. In this scenario, the same message will be delivered through both history response and 'chatDidReceiveMessage'. In this scenario, we will not know the last 'date_sent', as we may keep on get messages through 'chatDidReceiveMessage'. If we get either message ID (Which should be equivalent to custom object ID) for each message or total new message count in socket, we can handle this scenario in our app. |
QuickBlox releases Chat 2.0 which supports message history out of the box. Check new iOS Chat message http://quickblox.com/developers/SimpleSample-chat_users-ios |
Hi,
I am using Quickblox as backend for my iOS app.
I am integrating Quickblox chat in this app.
I need chat history also. So i tried this approach "http://quickblox.com/developers/Chat/1:1_Chat_history"
In that while receiving new message from another user, the message (QBChatMessage) ID is showing as always 0.
I faced the scenario like, User is in logged out state from chat. Another user is sending one or more messages to the current user. So once the current user logged in, the new messages will be coming from both chat delegate 'chatDidReceiveMessage:' and also in history query. To avoid duplicates i am overwriting those messages in already exists messages. So i need a primary key for messages from custom objects as well as chat. How to handle this scenario?
Any help would be much appreciated.
The text was updated successfully, but these errors were encountered: