mirror of
https://github.com/danog/MadelineProto.git
synced 2024-12-02 16:17:46 +01:00
This commit is contained in:
parent
5572c2dbe1
commit
1f661441bf
@ -111,8 +111,6 @@ abstract class MsgIdHandler
|
||||
*/
|
||||
public static function toString(string $messageId): string
|
||||
{
|
||||
return PHP_INT_SIZE === 8
|
||||
? MsgIdHandler64::toStringInternal($messageId)
|
||||
: MsgIdHandler32::toStringInternal($messageId);
|
||||
return MsgIdHandler64::toStringInternal($messageId);
|
||||
}
|
||||
}
|
||||
|
@ -1014,9 +1014,14 @@ abstract class Tools extends StrTools
|
||||
*/
|
||||
public static function parseLink(string $link): ?array
|
||||
{
|
||||
if (!\preg_match('@(?:t|telegram)\\.(?:me|dog)/(joinchat/|\+)?([a-z0-9_-]*)@i', $link, $matches)) {
|
||||
return null;
|
||||
if (\preg_match('@([a-z0-9_-]*)\\.(?:t|telegram)\.(?:me|dog)@', $link, $matches)) {
|
||||
if ($link !== 'www') {
|
||||
return [false, $matches[1]];
|
||||
}
|
||||
}
|
||||
if (\preg_match('@(?:t|telegram)\\.(?:me|dog)/(joinchat/|\+)?([a-z0-9_-]*)@i', $link, $matches)) {
|
||||
return [!!$matches[1], $matches[2]];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user