本文介绍了如何在Quickblox IOS中更新已发送的消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何更新服务器中发送的Q​​BChatMessage?对于例如在发送/传递消息之后,如何更新它的文本或自定义参数。还有一些参数在发送和交付后无法更改或更新吗?

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?

这是似乎也在做同样的事情。在IOS中如何实现这一目标?

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

推荐答案

QBRequest中有一种方法:

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;

用法与android中的用法相同。在这里,您可以阅读可以更新的字段:

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

这篇关于如何在Quickblox IOS中更新已发送的消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 08:31