java.lang.Object
it.tdlight.jni.TdApi.Object
it.tdlight.jni.TdApi.SecretChat
- Enclosing class:
- TdApi
Represents a secret chat.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Identifier uniquely determining type of the object.int
Secret chat identifier.boolean
True, if the chat was created by the current user; false otherwise.byte[]
Hash of the currently used key for comparison with the hash of the chat partner's key.int
Secret chat layer; determines features supported by the chat partner's application.State of the secret chat.long
Identifier of the chat partner. -
Constructor Summary
ConstructorDescriptionRepresents a secret chat.SecretChat
(int id, long userId, TdApi.SecretChatState state, boolean isOutbound, byte[] keyHash, int layer) Represents a secret chat.SecretChat
(DataInput input) Represents a secret chat. -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
Returns an identifier uniquely determining type of the object.int
hashCode()
void
serialize
(DataOutput output) Serialize the TDLib classMethods inherited from class it.tdlight.jni.TdApi.Object
serialize, toString
-
Field Details
-
id
public int idSecret chat identifier. -
userId
public long userIdIdentifier of the chat partner. -
state
State of the secret chat. -
isOutbound
public boolean isOutboundTrue, if the chat was created by the current user; false otherwise. -
keyHash
public byte[] keyHashHash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers. -
layer
public int layerSecret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, files bigger than 2000MB are supported if the layer >= 143, spoiler and custom emoji text entities are supported if the layer >= 144. -
CONSTRUCTOR
public static final int CONSTRUCTORIdentifier uniquely determining type of the object.- See Also:
-
-
Constructor Details
-
SecretChat
public SecretChat()Represents a secret chat. -
SecretChat
public SecretChat(int id, long userId, TdApi.SecretChatState state, boolean isOutbound, byte[] keyHash, int layer) Represents a secret chat.- Parameters:
id
- Secret chat identifier.userId
- Identifier of the chat partner.state
- State of the secret chat.isOutbound
- True, if the chat was created by the current user; false otherwise.keyHash
- Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 little-endian bytes, which must be split into groups of 2 bits, each denoting a pixel of one of 4 colors FFFFFF, D5E6F3, 2D5775, and 2F99C9. The pixels must be used to make a 12x12 square image filled from left to right, top to bottom. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers.layer
- Secret chat layer; determines features supported by the chat partner's application. Nested text entities and underline and strikethrough entities are supported if the layer >= 101, files bigger than 2000MB are supported if the layer >= 143, spoiler and custom emoji text entities are supported if the layer >= 144.
-
SecretChat
Represents a secret chat.- 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 classTdApi.Object
- Returns:
- this.CONSTRUCTOR
-
serialize
Serialize the TDLib class- Specified by:
serialize
in classTdApi.Object
- Parameters:
output
- output data stream- Throws:
IOException
- the serialization failed
-
equals
-
hashCode
public int hashCode()
-