mirror of
https://github.com/danog/MadelineProto.git
synced 2025-01-10 19:48:16 +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'],
|
$message['action']['message']['text'],
|
||||||
MessageEntity::fromRawEntities($message['action']['message']['entities']),
|
MessageEntity::fromRawEntities($message['action']['message']['entities']),
|
||||||
isset($message['action']['message']['parse_mode']) ?
|
isset($message['action']['message']['parse_mode']) ?
|
||||||
ParseMode::fromString($message['action']['message']['parse_mode'])
|
ParseMode::from($message['action']['message']['parse_mode'])
|
||||||
: null
|
: null
|
||||||
) : null,
|
) : null,
|
||||||
$message['action']['convert_stars'],
|
$message['action']['convert_stars'],
|
||||||
|
@ -24,14 +24,4 @@ enum ParseMode: string
|
|||||||
case HTML = 'HTML';
|
case HTML = 'HTML';
|
||||||
case MARKDOWN = 'Markdown';
|
case MARKDOWN = 'Markdown';
|
||||||
case TEXT = 'text';
|
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