public function __construct(#[\SensitiveParameter] string $accessToken, string $chatChannel = null, HttpClientInterface $client = null, EventDispatcherInterface $dispatcher = null)
{ $this->accessToken =
$accessToken;
$this->chatChannel =
$chatChannel;
$this->client =
$client;
parent::
__construct($client,
$dispatcher);
} public function __toString(): string
{ return sprintf('rocketchat://%s%s',
$this->
getEndpoint(), null !==
$this->chatChannel ? '?channel='.
$this->chatChannel : ''
);
} public function supports(MessageInterface
$message): bool
{ return $message instanceof ChatMessage
&& (null ===
$message->
getOptions() ||
$message->
getOptions() instanceof RocketChatOptions
);
} /**
* @see https://rocket.chat/docs/administrator-guides/integrations
*/
protected function doSend(MessageInterface
$message): SentMessage
{