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 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.

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 chat partner’s application. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101.

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

#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