lastMsg property
getter/setter pair
拉取消息的起始消息 @note 请注意
拉取 C2C 消息,只能使用 lastMsg 作为消息的拉取起点;如果没有指定 lastMsg,默认使用会话的最新消息作为拉取起点
拉取 Group 消息时,除了可以使用 lastMsg 作为消息的拉取起点外,也可以使用 lastMsgSeq 来指定消息的拉取起点,二者的区别在于: - 使用 lastMsg 作为消息的拉取起点时,返回的消息列表里不包含 lastMsg; - 使用 lastMsgSeq 作为消息拉取起点时,返回的消息列表里包含 lastMsgSeq 所表示的消息;
@note 在拉取 Group 消息时
如果同时指定了 lastMsg 和 lastMsgSeq,SDK 优先使用 lastMsg 作为消息的拉取起点
如果 lastMsg 和 lastMsgSeq 都未指定,消息的拉取起点分为如下两种情况: — 如果设置了拉取的时间范围,SDK 会根据 @getTimeBegin 所描述的时间点作为拉取起点 — 如果未设置拉取的时间范围,SDK 默认使用会话的最新消息作为拉取起点
Implementation
V2TimMessage? lastMsg;