Pubnub - 删除历史消息(存储)
Pubnub - removing a message in history (storage)
我在 iOS 上使用 pubnub 作为后端开发即时消息。经过一番谷歌搜索后,我找到了这种方式,但适用于 scala。
http://scalabl3.github.io/pubnub-design-patterns/2015/02/26/Message-Update-Delete.html
我想知道 API 中是否存在存档此文件的方法?
Pubnub 目前不支持从消息历史记录中删除内容。
PubNub 允许从频道删除消息
例如:
let startDate = NSNumber(value: (15101397027611671 as CUnsignedLongLong))
let endDate = NSNumber(value: (15101397427611671 as CUnsignedLongLong))
self.client.deleteMessage().channel("channel").start( startDate ).end(
endDate).performWithCompletion ( { (status) in
if !status.isError {
// Messages within specified time frame has been removed.
} else {
/**
* Handle message history download error. Check 'category' property to find out possible
* issue because of which request did fail.
*
* Request can be resent using: status.retry()
*/
}
})
参考pubnub documentation了解更多详情
我在 iOS 上使用 pubnub 作为后端开发即时消息。经过一番谷歌搜索后,我找到了这种方式,但适用于 scala。
http://scalabl3.github.io/pubnub-design-patterns/2015/02/26/Message-Update-Delete.html
我想知道 API 中是否存在存档此文件的方法?
Pubnub 目前不支持从消息历史记录中删除内容。
PubNub 允许从频道删除消息
例如:
let startDate = NSNumber(value: (15101397027611671 as CUnsignedLongLong))
let endDate = NSNumber(value: (15101397427611671 as CUnsignedLongLong))
self.client.deleteMessage().channel("channel").start( startDate ).end(
endDate).performWithCompletion ( { (status) in
if !status.isError {
// Messages within specified time frame has been removed.
} else {
/**
* Handle message history download error. Check 'category' property to find out possible
* issue because of which request did fail.
*
* Request can be resent using: status.retry()
*/
}
})
参考pubnub documentation了解更多详情