获取本地消息的配置

beforeCount afterCount 总共分为四种情况

1. beforeCount > 0 && afterCount > 0将获取 beforeCount + {time} + afterCount 的消息
2. beforeCount > 0 && afterCount == 0将获取 beforeCount + {time} 的消息
3. beforeCount == 0 && afterCount > 0将获取 {time} + afterCount 的消息
4. beforeCount == 0 && afterCount == 0将获取 {time}

1.0.0

interface IGetLocalMsgByTimeOption {
    objNameList?: List<string>;
    time: number;
    beforeCount: number;
    afterCount: number;
}

Properties

objNameList?: List<string>

objectName 集合,为空的话代表获取所有类型的本地消息

有效值的话代表获取指定类型的消息

time: number

毫秒时间戳 初次可以传入当前时间: Date.now() 或者传入会话的 lastSentTime

Conversation

beforeCount: number

在 messageId 之前的消息个数,取值 >=0

beforeCount 如果传入 10 ,但是获取的个数不足时说明往前没有更多的消息了

afterCount: number

在 messageId 之后的消息个数,取值 >=0

afterCount 如果传入 10 ,但是获取的个数不足时说明往后没有更多的消息了