TDLib
Loading...
Searching...
No Matches
restrictionInfo Class Referencefinal

Inherits Object.

Description

Contains information about restrictions that must be applied to a chat or a message.

Public Member Functions

 restrictionInfo ()
 restrictionInfo (string const &restriction_reason_, bool has_sensitive_content_)
void store (TlStorerToString &s, const char *field_name) const final
Public Member Functions inherited from TlObject
TlObject & operator= (const TlObject &)=delete
TlObject & operator= (TlObject &&)=default
virtual void store (TlStorerCalcLength &s) const
virtual void store (TlStorerUnsafe &s) const
 TlObject ()=default
 TlObject (const TlObject &)=delete
 TlObject (TlObject &&)=default
virtual ~TlObject ()=default

Public Attributes

bool has_sensitive_content_
 True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option "can_ignore_sensitive_content_restrictions" to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option "ignore_sensitive_content_restrictions" to true if the user passes age verification.
string restriction_reason_
 A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.

Static Public Attributes

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

Constructor & Destructor Documentation

◆ restrictionInfo() [1/2]

restrictionInfo ( )

Contains information about restrictions that must be applied to a chat or a message.

◆ restrictionInfo() [2/2]

restrictionInfo ( string const & restriction_reason_,
bool has_sensitive_content_ )

Contains information about restrictions that must be applied to a chat or a message.

Parameters
[in]restriction_reason_A human-readable description of the reason why access to the content must be restricted. If empty, then the content can be accessed, but may be covered by hidden with 18+ spoiler anyway.
[in]has_sensitive_content_True, if media content of the messages must be hidden with 18+ spoiler. Use value of the option "can_ignore_sensitive_content_restrictions" to check whether the current user can ignore the restriction. If age verification parameters were received in updateAgeVerificationParameters, then the user must complete age verification to ignore the restriction. Set the option "ignore_sensitive_content_restrictions" to true if the user passes age verification.

Member Function Documentation

◆ 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: