mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-10 16:48:15 +01:00
Remove fromString as it doesn't needed
This commit is contained in:
parent
cb950f139e
commit
54f7858494
@ -717,7 +717,7 @@ trait UpdateHandler
|
||||
$message['action']['message']['text'],
|
||||
MessageEntity::fromRawEntities($message['action']['message']['entities']),
|
||||
isset($message['action']['message']['parse_mode']) ?
|
||||
ParseMode::fromString($message['action']['message']['parse_mode'])
|
||||
ParseMode::from($message['action']['message']['parse_mode'])
|
||||
: null
|
||||
) : null,
|
||||
$message['action']['convert_stars'],
|
||||
|
@ -24,14 +24,4 @@ enum ParseMode: string
|
||||
case HTML = 'HTML';
|
||||
case MARKDOWN = 'Markdown';
|
||||
case TEXT = 'text';
|
||||
/** @internal */
|
||||
public static function fromString(string $mode): ?string
|
||||
{
|
||||
foreach (self::cases() as $case) {
|
||||
if(strtoupper($mode) === $case->name) {
|
||||
return $case->value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user