We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2a59314 commit fb64c69Copy full SHA for fb64c69
src/Symfony/Component/Notifier/Bridge/Discord/DiscordTransport.php
@@ -29,7 +29,7 @@ final class DiscordTransport extends AbstractTransport
29
{
30
protected const HOST = 'discord.com';
31
32
- private const MAX_SUBJECT_LENGTH = 2000;
+ private const SUBJECT_LIMIT = 2000;
33
34
private $token;
35
private $webhookId;
@@ -67,7 +67,7 @@ protected function doSend(MessageInterface $message): SentMessage
67
68
$content = $message->getSubject();
69
70
- if (mb_strlen($content) > self::MAX_SUBJECT_LENGTH) {
+ if (mb_strlen($content, 'UTF-8') > self::SUBJECT_LIMIT) {
71
throw new LogicException('The subject length of a Discord message must not exceed 2000 characters.');
72
}
73
0 commit comments