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



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

def id
  @id
end

#is_outboundBoolean

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

Returns:

  • (Boolean)

    the current value of is_outbound



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

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



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

def key_hash
  @key_hash
end

#layerInteger

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.

Returns:

  • (Integer)

    the current value of layer



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

def layer
  @layer
end

#stateTD::Types::SecretChatState

State of the secret chat.

Returns:



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

def state
  @state
end

#user_idInteger

Identifier of the chat partner.

Returns:

  • (Integer)

    the current value of user_id



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

def user_id
  @user_id
end