Class: TD::Types::SecretChat

Inherits:
Base
  • Object
show all
Defined in:
lib/tdlib/types/secret_chat.rb

Overview

Represents a secret chat.

Instance Attribute Summary collapse

Method Summary

Methods inherited from Base

#to_hash, #to_json

Instance Attribute Details

#idInteger

Secret chat identifier.

Returns:

  • (Integer)

    the current value of id



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def id
  @id
end

#is_outboundBoolean

True, if the chat was created by the current user; otherwise false.

Returns:

  • (Boolean)

    the current value of is_outbound



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def is_outbound
  @is_outbound
end

#key_hashString

Hash of the currently used key for comparison with the hash of the chat partner's key. This is a string of 36 bytes, which must be used to make a 12x12 square image with a color depth of 4. The first 16 bytes should be used to make a central 8x8 square, while the remaining 20 bytes should be used to construct a 2-pixel-wide border around that square. Alternatively, the first 32 bytes of the hash can be converted to the hexadecimal format and printed as 32 2-digit hex numbers.

Returns:

  • (String)

    the current value of key_hash



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def key_hash
  @key_hash
end

#layerInteger

Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66.

Returns:

  • (Integer)

    the current value of layer



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def layer
  @layer
end

#stateTD::Types::SecretChatState

State of the secret chat.

Returns:



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def state
  @state
end

#ttlInteger

Current message Time To Live setting (self-destruct timer) for the chat, in seconds.

Returns:

  • (Integer)

    the current value of ttl



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def ttl
  @ttl
end

#user_idInteger

Identifier of the chat partner.

Returns:

  • (Integer)

    the current value of user_id



17
18
19
# File 'lib/tdlib/types/secret_chat.rb', line 17

def user_id
  @user_id
end