Properties | |
V2TIMMessageGetType | getType |
NSString * | userID |
NSString * | groupID |
NSUInteger | count |
NSArray< NSNumber * > * | messageTypeList |
V2TIMMessage * | lastMsg |
NSUInteger | lastMsgSeq |
NSUInteger | getTimeBegin |
NSUInteger | getTimePeriod |
NSArray< NSNumber * > * | messageSeqList |
|
readwritenonatomicassign |
Message pulling type, which can be set to pull older or newer messages from local storage or the cloud
For pulling messages from the cloud, the locally stored and cloud stored message lists are combined and returned. If no network connection is available, only the locally stored message list is returned.
The following are the instructions for getType and the start message and time range for message pulling:
getType | Pulling type. Valid values: V2TIM_GET_CLOUD_OLDER_MSG, V2TIM_GET_CLOUD_NEWER_MSG, V2TIM_GET_LOCAL_OLDER_MSG, V2TIM_GET_LOCAL_NEWER_MSG |
|
readwritenonatomicstrong |
Pull historical one-to-one chat messages.
|
readwritenonatomicstrong |
Pull historical group messages.
|
readwritenonatomicassign |
Number of messages to be pulled.
|
readwritenonatomicstrong |
Set the message types to pull, valid only when getType is V2TIM_GET_LOCAL_OLDER_MSG and V2TIM_GET_LOCAL_NEWER_MSG,If null is passed in, all message types supported are pulled.
|
readwritenonatomicstrong |
Start message for message pulling
When one-to-one messages are pulled, only lastMsg can be used to specify the start point for message pulling. If lastMsg is not specified, the IM SDK uses the newest message of the conversation as the start point for message pulling.
When group messages are pulled, lastMsg or lastMsgSeq can be used to specify the start point for message pulling:
If both lastMsg and lastMsgSeq are specified, the IM SDK uses lastMsg to determine the start point for message pulling.
If both lastMsg and lastMsgSeq are not specified, there are two cases for the start point for message pulling:
|
readwritenonatomicassign |
|
readwritenonatomicassign |
Time range for message pulling
getTimeBegin: indicates the start point of the time range. The default value is 0, indicating to start pulling now. The value can also be the UTC timestamp, in seconds.
getTimePeriod: indicates the length of the time range, in seconds. The default value is 0, indicating that the time range is not limited.
The direction of the time range is determined by the getType parameter:
If getType is V2TIM_GET_CLOUD_OLDER_MSG/V2TIM_GET_LOCAL_OLDER_MSG, the time range is a period of time in the past, starting from getTimeBegin and with a length determined by getTimePeriod.
If getType is V2TIM_GET_CLOUD_NEWER_MSG/V2TIM_GET_LOCAL_NEWER_MSG, the time range is a period of time in the future, starting from getTimeBegin and with a length determined by getTimePeriod.
The value range is a closed range, including the start and end points in time. The relationship between the two is as follows:
|
readwritenonatomicassign |
|
readwritenonatomicstrong |
Pulling group history messages according to the specific message sequence list (Supported only in imsdk 7.1 and later versions)