I'm using JSQMessages (https://github.com/jessesquires/JSQMessagesViewController) to handle chat within my application.
I would like to show inside JSQMessages UI if the message was delivered, if the message was read by the other end or if there was a problem in the delivery ( the same functions performed by other chat applications ).
How can I customize it to show this information ? My goal is to add a check, a double check or a red exclamation if the message could not be delivered.
Any ideas how I can accomplish this using JSQMessages ?
Thanks a lot,
Daniel
You can add a status enum in your JSQMessage model class to represent different delivery status flags. and in your JSQMessagesController subclass you can override this method :
- (NSAttributedString *)collectionView:(JSQMessagesCollectionView *)collectionView attributedTextForCellBottomLabelAtIndexPath:(NSIndexPath *)indexPath
and return an NSAttributedString matching the delivery flag you want to show.
Bear in mind that this has nothing to do with the backend. JSQMessages is for UI only so backend work has to be done by you.
you can get more information here : https://github.com/jessesquires/JSQMessagesViewController/issues/190