Module tdlight.api
Package it.tdlight.jni

# Class TdApi.GetChatMessagePosition

java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.Function<TdApi.Count>
it.tdlight.jni.TdApi.GetChatMessagePosition

Enclosing class:
  TdApi

public static final class TdApi.GetChatMessagePosition extends TdApi.Function<TdApi.Count>
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats.

Returns `Count`

## Field Summary

Fields
Modifier and Type
Field
Description
`long`
`chatId`
Identifier of the chat in which to find message position.
`static final int`
`CONSTRUCTOR`
Identifier uniquely determining type of the object.
`TdApi.SearchMessagesFilter`
`filter`
Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.
`long`
`messageId`
Message identifier.
`long`
`messageThreadId`
If not 0, only messages in the specified thread will be considered; supergroups only.
`long`
`savedMessagesTopicId`
If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages.

## Constructor Summary

Constructors
Constructor
Description
`GetChatMessagePosition()`
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat.
`GetChatMessagePosition(long chatId, long messageId, TdApi.SearchMessagesFilter filter, long messageThreadId, long savedMessagesTopicId)`
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat.
`GetChatMessagePosition(DataInput input)`
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat.

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object o)`
`int`
`getConstructor()`
Returns an identifier uniquely determining type of the object.
`int`
`hashCode()`
`void`
`serialize(DataOutput output)`
Serialize the TDLib class

### 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 find message position.

### messageId

public long messageId
Message identifier.

### filter

public TdApi.SearchMessagesFilter filter
Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.

### messageThreadId

public long messageThreadId
If not 0, only messages in the specified thread will be considered; supergroups only.

### savedMessagesTopicId

public long savedMessagesTopicId
If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages.

### CONSTRUCTOR

public static final int CONSTRUCTOR
Identifier uniquely determining type of the object.

See Also:
  - Constant Field Values

## Constructor Details

### GetChatMessagePosition

public GetChatMessagePosition()
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats.

Returns `Count`

### GetChatMessagePosition

public GetChatMessagePosition(long chatId, long messageId, TdApi.SearchMessagesFilter filter, long messageThreadId, long savedMessagesTopicId)
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats.

Returns `Count`

Parameters:
  `chatId` - Identifier of the chat in which to find message position.
  `messageId` - Message identifier.
  `filter` - Filter for message content; searchMessagesFilterEmpty, searchMessagesFilterUnreadMention, searchMessagesFilterUnreadReaction, and searchMessagesFilterFailedToSend are unsupported in this function.
  `messageThreadId` - If not 0, only messages in the specified thread will be considered; supergroups only.
  `savedMessagesTopicId` - If not 0, only messages in the specified Saved Messages topic will be considered; pass 0 to consider all relevant messages, or for chats other than Saved Messages.

  Returns `Count`

### GetChatMessagePosition

public GetChatMessagePosition(DataInput input) throws IOException
Returns approximate 1-based position of a message among messages, which can be found by the specified filter in the chat. Cannot be used in secret chats.

Returns `Count`

Parameters:
  `input` - Serialized input
Throws:
  `IOException` - the deserialization failed

## Method Details

### getConstructor

public int getConstructor()
Description copied from class: `TdApi.Object`
Returns an identifier uniquely determining type of the object.

Specified by:
  `getConstructor` in class `TdApi.Object`
Returns:
  this.CONSTRUCTOR

### serialize

public void serialize(DataOutput output) throws IOException
Serialize the TDLib class

Specified by:
  `serialize` in class `TdApi.Object`
Parameters:
  `output` - output data stream
Throws:
  `IOException` - the serialization failed

### equals

public boolean equals(Object o)

Overrides:
  `equals` in class `Object`

### hashCode

public int hashCode()

Overrides:
  `hashCode` in class `Object`