objective c - How to update Read and Delivery status of sent and received messages using Quickblox IOS? -
i have implemented chat sample app using quickblox,and followed samplechat app provided quckblox(urls provided below). want update read , delivery status of each message. how achieve this?
- http://quickblox.com/developers/simplesample-chat_users-ios
- https://github.com/quickblox/quickblox-ios-sdk/tree/master/sample-chat
in link 1 have explained code i'm unable implement.
there docs read , delivered status in link provided.
to make answer more explicit, there several ways mark messages read , delivered. delivered marking there xmpp way available, use method qbchat it:
/** * send "delivered" status message. * * @param message qbchatmessage message mark delivered. * @param completion completion block failure error. */ - (void)markasdelivered:(qb_nonnull qbchatmessage *)message completion:(qb_nullable qbchatcompletionblock)completion;
for read marker can use either rest request using qbrequest method:
/** mark messages read. @note updates message "read" status on server. @param dialogid dialog id. @param messagesids set of chat message ids mark read. if messageids nil messages in dialog marked read. @param successblock block response instance if request succeded. @param errorblock block response instance if request failed. @return instance, conforms cancelable protocol. use instance cancel operation. */ + (qb_nonnull qbrequest *)markmessagesasread:(qb_nonnull nsset qb_generic(nsstring *) *)messagesids dialogid:(qb_nonnull nsstring *)dialogid successblock:(qb_nullable void(^)(qbresponse * qb_nonnull_s response))successblock errorblock:(qb_nullable qbrequesterrorblock)errorblock;
or xmpp method of qbchat:
/** * send "read" status message , update "read" status on server * * @param message qbchatmessage message mark read. * @param completion completion block failure error. */ - (void)readmessage:(qb_nonnull qbchatmessage *)message completion:(qb_nullable qbchatcompletionblock)completion;
anyway closer samples , documentation if need "live" example.
Comments
Post a Comment