回放聊天
方法
:getChatWithDuration
功能描述:
按时间点获取对应时间区间的聊天数据列表
@参数说明:
参数 | 类型 | 描述 |
---|---|---|
duration | NSInteger | 指定时间点(单位秒) |
返回参数说明:
参数 | 类型 | 描述 |
---|---|---|
uid | NSString | 客户用户ID |
starttime | NSString | 聊天开始的时间戳 |
gid | NSString | 客户定义的用户组ID |
avatar | NSString | 头像地址(不存在该字段,或者该字段为空,代表没有设置头像,请使用本地默认头像) |
role | NSString | 用户角色(对应TalkfunSDK.h里面的角色定义) |
nickname | NSString | 用户昵称 |
msg | NSString | 聊天内容 |
xid | NSString | 该用户在欢拓平台上的唯一ID |
调用示例:
[talkfunSDK getChatWithDuration:10 callback:^(id obj) {
{
//返回数据示例
[{
uid = "2311926";
starttime = "536";
timestamp = "1506425518";
time = "536";
gid = "0";
avatar = "https://lp3-4.talk-fun.com/avatar/229/304/332/16607104.jpg";
cmd = "1";
role = "user";
nickname = "豹哥????-行政管理专科";
msg = "对";
xid = "16607104";
},
{
uid = "2308755";
starttime = "526";
timestamp = "1506425508";
time = "526";
gid = "0";
avatar = "https://lp3-4.talk-fun.com/avatar/72/537/1153/16611537.jpg";
cmd = "2";
role = "user";
nickname = "王建霞V-行政管理专科";
msg = "送给老师:[S_FLOWER][S_FLOWER][S_FLOWER]";
xid = "16611537";
}]
}];