Package ai.nexconn.chat.params
Class SearchMessagesByUserQueryParams
-
- All Implemented Interfaces:
public final class SearchMessagesByUserQueryParamsParameters for searching messages by user.
Used for ai.nexconn.chat.channel.BaseChannel.createSearchMessagesByUserQuery to create a pagination query object.
For ChannelType.COMMUNITY channels:
When subChannelIds is null or empty, searches all sub-channels.
When subChannelIds has values, searches only the specified sub-channels.
For other channel types, subChannelIds is ignored.
Usage Example:
val params = SearchMessagesByUserQueryParams( channelId = "channel123", channelType = ChannelType.GROUP, userId = "user123" ) val query = BaseChannel.createSearchMessagesByUserQuery(params) query.loadNextPage { messages, error -> if (error == null && messages != null) { // Handle results } }
-
-
Field Summary
Fields Modifier and Type Field Description private final StringchannelIdprivate final ChannelTypechannelTypeprivate final StringuserIdprivate final LongstartTimeprivate final IntegerpageSizeprivate final List<String>subChannelIds
-
Constructor Summary
Constructors Constructor Description SearchMessagesByUserQueryParams(String channelId, ChannelType channelType, String userId, Long startTime, Integer pageSize, List<String> subChannelIds)
-
Method Summary
Modifier and Type Method Description final StringgetChannelId()final ChannelTypegetChannelType()final StringgetUserId()final LonggetStartTime()final IntegergetPageSize()final List<String>getSubChannelIds()-
-
Constructor Detail
-
SearchMessagesByUserQueryParams
SearchMessagesByUserQueryParams(String channelId, ChannelType channelType, String userId, Long startTime, Integer pageSize, List<String> subChannelIds)
- Parameters:
channelId- Target channel IDchannelType- Target channel typeuserId- User ID to search messages fromstartTime- Start timestamp (milliseconds), default 0 starts from the latest messagepageSize- Number of results per page, default 20subChannelIds- Sub-channel ID list (only effective for ChannelType.COMMUNITY); null or empty searches all sub-channels
-
-
Method Detail
-
getChannelId
final String getChannelId()
-
getChannelType
final ChannelType getChannelType()
-
getUserId
final String getUserId()
-
getStartTime
final Long getStartTime()
-
getPageSize
final Integer getPageSize()
-
getSubChannelIds
final List<String> getSubChannelIds()
-
-
-
-