* Searches a public chat by its username. Currently only private chats, supergroups and channels can be public. Returns the chat if found; otherwise an error is returned.
13
*/
14
class SearchPublicChat extends TdFunction
15
{
16
public const TYPE_NAME = 'searchPublicChat';
17
18
/**
19
* Username to be resolved.
20
*
21
* @var string
22
*/
23
protected string $username;
24
25
public function __construct(string $username)
26
{
27
$this->username = $username;
28
}
29
30
public static function fromArray(array $array): SearchPublicChat