How to update a sent message in Quickblox IOS

只谈情不闲聊 提交于 2019-12-20 05:39:11

问题


How do I update a sent QBChatMessage in the server? For e.g. After the message is sent/delivered, how does one update it's text or custom parameters. Also are there parameters that cannot be changed or updated once sent and delivered?

Here's a link to the snippet on Quickblox Android that seems to be doing the same. How is this achieved in IOS?


回答1:


There is a method in QBRequest:

/**
 Update existing chat message - mark it as read.

 @param message Сhat message to update.
 @param successBlock Block with response instance if request succeded.
 @param errorBlock Block with response instance if request failed.

 @return An instance of QBRequest for cancel operation mainly.
 */
+ (QBRequest *)updateMessage:(QBChatMessage *)message
                successBlock:(nullable void(^)(QBResponse *response))successBlock
                  errorBlock:(nullable QBRequestErrorBlock)errorBlock;

The usage is the same as in android pretty much. Here you can read which fields you can update: http://quickblox.com/developers/Chat#Fields_to_update_2



来源:https://stackoverflow.com/questions/40755187/how-to-update-a-sent-message-in-quickblox-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!