Module tdlight.api
Package it.tdlight.jni

# Class TdApi.GetChatSparseMessagePositions

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.MessagePositions>
it.tdlight.jni.TdApi.GetChatSparseMessagePositions

Enclosing class:
  TdApi

public static final class TdApi.GetChatSparseMessagePositions extends TdApi.Function<TdApi.MessagePositions>
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing messageId). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.

Returns `MessagePositions`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Identifier of the chat in which to return information about message positions.
`static final int`
`CONSTRUCTOR`
`TdApi.SearchMessagesFilter`
`filter`
Filter for message content.
`long`
`fromMessageId`
The message identifier from which to return information about message positions.
`int`
`limit`
The expected number of message positions to be returned; 50-2000.

## Constructor Summary

Constructors
Constructor
Description
`GetChatSparseMessagePositions()`
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.
`GetChatSparseMessagePositions(long chatId, TdApi.SearchMessagesFilter filter, long fromMessageId, int limit)`
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.
`GetChatSparseMessagePositions(DataInput input)`
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`

### Methods inherited from class it.tdlight.jni.TdApi.Function

`toString`

### Methods inherited from class it.tdlight.jni.TdApi.Object

`serialize`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

## Field Details

### chatId

public long chatId
Identifier of the chat in which to return information about message positions.

### filter

public TdApi.SearchMessagesFilter filter
Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention and searchMessagesFilterUnreadMention are unsupported in this function.

### fromMessageId

public long fromMessageId
The message identifier from which to return information about message positions.

### limit

public int limit
The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages.

### CONSTRUCTOR

public static final int CONSTRUCTOR

See Also:
  - Constant Field Values

## Constructor Details

### GetChatSparseMessagePositions

public GetChatSparseMessagePositions()
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing messageId). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.

Returns `MessagePositions`

### GetChatSparseMessagePositions

public GetChatSparseMessagePositions(long chatId, TdApi.SearchMessagesFilter filter, long fromMessageId, int limit)
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing messageId). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.

Returns `MessagePositions`

Parameters:
  `chatId` - long Identifier of the chat in which to return information about message positions.
  `filter` - SearchMessagesFilter Filter for message content. Filters searchMessagesFilterEmpty, searchMessagesFilterCall, searchMessagesFilterMissedCall, searchMessagesFilterMention and searchMessagesFilterUnreadMention are unsupported in this function.
  `fromMessageId` - long The message identifier from which to return information about message positions.
  `limit` - int The expected number of message positions to be returned; 50-2000. A smaller number of positions can be returned, if there are not enough appropriate messages.

### GetChatSparseMessagePositions

public GetChatSparseMessagePositions(DataInput input) throws IOException
Returns sparse positions of messages of the specified type in the chat to be used for shared media scroll implementation. Returns the results in reverse chronological order (i.e., in order of decreasing messageId). Cannot be used in secret chats or with searchMessagesFilterFailedToSend filter without an enabled message database.

Returns `MessagePositions`

Throws:
  `IOException`

## Method Details

### getConstructor

public int getConstructor()

Specified by:
  `getConstructor` in class `TdApi.Object`

### serialize

public void serialize(DataOutput output) throws IOException

Specified by:
  `serialize` in class `TdApi.Object`
Throws:
  `IOException`

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`