SecretChat

public struct SecretChat : Codable, Equatable, FunctionResult

Represents a secret chat

  • id

    Secret chat identifier

    Declaration

    Swift

    public let id: Int32
  • Identifier of the chat partner

    Declaration

    Swift

    public let userId: Int32
  • State of the secret chat

    Declaration

    Swift

    public let state: SecretChatState
  • True, if the chat was created by the current user; otherwise false

    Declaration

    Swift

    public let isOutbound: Bool
  • ttl

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

    Declaration

    Swift

    public let ttl: Int32
  • 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

    Declaration

    Swift

    public let keyHash: Bytes
  • Secret chat layer; determines features supported by the other client. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101

    Declaration

    Swift

    public let layer: Int32
  • Represents a secret chat

    Declaration

    Swift

    public init(id: Int32, userId: Int32, state: SecretChatState, isOutbound: Bool, ttl: Int32, keyHash: Bytes, layer: Int32)

    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; otherwise false

    ttl

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

    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 other client. Video notes are supported if the layer >= 66; nested text entities and underline and strikethrough entities are supported if the layer >= 101