List of all members | Public Fields | Public Types | Public Instance Methods | Static Public Attributes
forwardMessages Class Referencefinal

Inherits Function.

Description

Forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.

Returns object_ptr<Messages>.

Public Fields

int53 chat_id_
 Identifier of the chat to which to forward messages.
 
int53 from_chat_id_
 Identifier of the chat from which to forward messages.
 
array< int53message_ids_
 Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously.
 
object_ptr< messageSendOptionsoptions_
 Options to be used to send the messages; pass null to use default options.
 
bool send_copy_
 If true, content of the messages will be copied without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local.
 
bool remove_caption_
 If true, media caption of message copies will be removed. Ignored if send_copy is false.
 
bool only_preview_
 If true, messages will not be forwarded and instead fake messages will be returned.
 

Public Types

using ReturnType = object_ptr< messages >
 Typedef for the type returned by the function.
 

Public Instance Methods

 forwardMessages ()
 
 forwardMessages (int53 chat_id_, int53 from_chat_id_, array< int53 > &&message_ids_, object_ptr< messageSendOptions > &&options_, bool send_copy_, bool remove_caption_, bool only_preview_)
 
std::int32_t get_id () const final
 
void store (TlStorerToString &s, const char *field_name) const final
 
- Public Instance Methods inherited from TlObject
virtual void store (TlStorerUnsafe &s) const
 
virtual void store (TlStorerCalcLength &s) const
 
 TlObject ()=default
 
 TlObject (const TlObject &)=delete
 
TlObjectoperator= (const TlObject &)=delete
 
 TlObject (TlObject &&)=default
 
TlObjectoperator= (TlObject &&)=default
 
virtual ~TlObject ()=default
 

Static Public Attributes

static const std::int32_t ID = -798726491
 Identifier uniquely determining a type of the object.
 

Constructor & Destructor Documentation

◆ forwardMessages() [1/2]

Default constructor for a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.

Returns object_ptr<Messages>.

◆ forwardMessages() [2/2]

forwardMessages ( int53  chat_id_,
int53  from_chat_id_,
array< int53 > &&  message_ids_,
object_ptr< messageSendOptions > &&  options_,
bool  send_copy_,
bool  remove_caption_,
bool  only_preview_ 
)

Creates a function, which forwards previously sent messages. Returns the forwarded messages in the same order as the message identifiers passed in message_ids. If a message can't be forwarded, null will be returned instead of the message.

Returns object_ptr<Messages>.

Parameters
[in]chat_id_Identifier of the chat to which to forward messages.
[in]from_chat_id_Identifier of the chat from which to forward messages.
[in]message_ids_Identifiers of the messages to forward. Message identifiers must be in a strictly increasing order. At most 100 messages can be forwarded simultaneously.
[in]options_Options to be used to send the messages; pass null to use default options.
[in]send_copy_If true, content of the messages will be copied without reference to the original sender. Always true if the messages are forwarded to a secret chat or are local.
[in]remove_caption_If true, media caption of message copies will be removed. Ignored if send_copy is false.
[in]only_preview_If true, messages will not be forwarded and instead fake messages will be returned.

Method Documentation

◆ get_id()

std::int32_t get_id ( ) const
inlinefinalvirtual

Returns identifier uniquely determining a type of the object.

Returns
this->ID.

Implements TlObject.

◆ store()

void store ( TlStorerToString &  s,
const char *  field_name 
) const
finalvirtual

Helper function for to_string method. Appends string representation of the object to the storer.

Parameters
[in]sStorer to which object string representation will be appended.
[in]field_nameObject field_name if applicable.

Implements TlObject.


The documentation for this class was generated from the following file: