SearchMessagesByUserQueryParams

Parameters 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
}
}

Parameters

channelId

Target channel ID

channelType

Target channel type

userId

User ID to search messages from

startTime

Start timestamp (milliseconds), default 0 starts from the latest message

pageSize

Number of results per page, default 20

subChannelIds

Sub-channel ID list (only effective for ChannelType.COMMUNITY); null or empty searches all sub-channels

Constructors

Link copied to clipboard
public SearchMessagesByUserQueryParams SearchMessagesByUserQueryParams(String channelId, ChannelType channelType, String userId, Long startTime, Integer pageSize, List<String> subChannelIds)

Properties

Link copied to clipboard
private final String channelId
Link copied to clipboard
private final ChannelType channelType
Link copied to clipboard
private final Integer pageSize
Link copied to clipboard
private final Long startTime
Link copied to clipboard
private final List<String> subChannelIds
Link copied to clipboard
private final String userId

Functions

Link copied to clipboard
public final String getChannelId()
Link copied to clipboard
public final ChannelType getChannelType()
Link copied to clipboard
public final Integer getPageSize()
Link copied to clipboard
public final Long getStartTime()
Link copied to clipboard
public final List<String> getSubChannelIds()
Link copied to clipboard
public final String getUserId()