You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
virt/web/app/Services/Telegram/AdministratorTelegramDestin...

21 lines
592 B
PHP

<?php
namespace App\Services\Telegram;
/** Immutable identity of the currently bound administrator Telegram chat. */
final readonly class AdministratorTelegramDestination
{
public function __construct(
public int $administratorId,
public string $chatId,
public string $bindingGeneration
) {}
public function equals(self $other): bool
{
return $this->administratorId === $other->administratorId
&& hash_equals($this->chatId, $other->chatId)
&& hash_equals($this->bindingGeneration, $other->bindingGeneration);
}
}