@tgsnake/skema
    Preparing search index...

    Class SecretChatMessage

    Represents a secret chat message with encrypted content.

    This class extends TLObject and is used to encapsulate the details of a message in a secret chat, including its unique identifier, chat context, timestamp, message content, and associated encrypted file.

    const secretMessage = new SecretChatMessage({
    randomId: 1234567890123456789n,
    chatId: 42,
    date: 1680000000,
    message: decryptedMessageInstance,
    file: encryptedFileInstance
    });

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    _slots: string[]

    Internal array of slot names for the object.

    chatId: number

    The identifier of the chat where the message was sent.

    className: string

    Name of the class.

    classType: string

    Type of the class.

    cls: any = ...

    Reference to the constructor of the current class (late static binding).

    constructorId: number

    Unique identifier for the constructor.

    date: number

    The Unix timestamp indicating when the message was sent.

    The encrypted file associated with the message.

    message:
        | DecryptedMessage8
        | DecryptedMessage17
        | DecryptedMessage45
        | DecryptedMessage73

    The decrypted message content, which can be one of several types.

    randomId: bigint

    A unique identifier for the message, represented as a bigint.

    subclassOfId: number

    Identifier for the parent class (if any).

    Methods

    • Reads data from the provided BytesIO instance and processes it using the associated class's read method.

      Parameters

      • data: BytesIO

        The BytesIO instance containing the data to be read.

      • ...args: any[]

        Additional arguments to be passed to the class's read method.

      Returns Promise<any>

      A promise that resolves with the result of the read operation.

    • Serializes the provided arguments using the associated class's write method.

      Parameters

      • ...args: any[]

        The arguments to be serialized.

      Returns Buffer

      The resulting Buffer after serialization.

    • Reads a TLObject from the provided BytesIO stream.

      This static method reads a 32-bit unsigned integer (interpreted as the object ID) from the stream, logs the reading operation, dynamically resolves the corresponding TLObject class, and delegates the reading process to that class's read method.

      Parameters

      • data: BytesIO

        The BytesIO stream to read the TLObject from.

      • ...args: any[]

        Additional arguments to pass to the resolved TLObject's read method.

      Returns Promise<any>

      A Promise that resolves to the deserialized TLObject instance.

    • Serializes the provided arguments into a Buffer.

      Parameters

      • ..._args: any[]

        The arguments to be serialized.

      Returns Buffer

      A Buffer containing the serialized data.

      This is a static method. The current implementation returns an empty Buffer.