1
0
mirror of https://github.com/danog/MadelineProto.git synced 2025-01-22 15:51:15 +01:00
This commit is contained in:
Daniil Gentili 2023-06-14 22:19:05 +02:00
parent e80285ea87
commit 5505a9b0fc
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
5 changed files with 8 additions and 37 deletions

View File

@ -367,9 +367,6 @@ Want to add your own open-source project to this list? [Click here!](https://doc
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels.toggleAntiSpam.html" name="channels.toggleAntiSpam">Enable or disable the native antispam system: channels.toggleAntiSpam</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/contacts.toggleTopPeers.html" name="contacts.toggleTopPeers">Enable/disable top peers: contacts.toggleTopPeers</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/channels.toggleSignatures.html" name="channels.toggleSignatures">Enable/disable message signatures in channels: channels.toggleSignatures</a>
* <a href="https://docs.madelineproto.xyz/PHP/danog/MadelineProto/API.html#methodescape-string-method-string" name="methodEscape">Escape method name: methodEscape</a>
* <a href="https://docs.madelineproto.xyz/PHP/danog/MadelineProto/API.html#markdownescape-string-hwat-string" name="markdownEscape">Escape string for markdown: markdownEscape</a>
* <a href="https://docs.madelineproto.xyz/PHP/danog/MadelineProto/API.html#typeescape-string-type-string" name="typeEscape">Escape type name: typeEscape</a>
* <a href="https://docs.madelineproto.xyz/PHP/danog/MadelineProto/API.html#broadcastcustom-action-action-danog-madelineproto-broadcast-filter-filter-int" name="broadcastCustom">Executes a custom broadcast action with all peers (users, chats, channels) of the bot: broadcastCustom</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/chatlists.exportChatlistInvite.html" name="chatlists.exportChatlistInvite">Export a folder », creating a chat folder deep link »: chatlists.exportChatlistInvite</a>
* <a href="https://docs.madelineproto.xyz/API_docs/methods/messages.exportChatInvite.html" name="messages.exportChatInvite">Export an invite link for a chat: messages.exportChatInvite</a>

2
docs

@ -1 +1 @@
Subproject commit 5168b40423f0133b249526e88d365adf0d96f9a3
Subproject commit c433c7138d9e88851f1b2bfd4a31768845a8d56e

View File

@ -76,14 +76,14 @@ class RedisArray extends DriverArray
}
public function set(string|int $key, mixed $value): void
{
if ($this->hasCache($index) && $this->getCache($index) === $value) {
if ($this->hasCache($key) && $this->getCache($key) === $value) {
return;
}
$this->setCache($index, $value);
$this->setCache($key, $value);
$this->db->set($this->rKey($index), ($this->serializer)($value));
$this->setCache($index, $value);
$this->db->set($this->rKey($key), ($this->serializer)($value));
$this->setCache($key, $value);
}
public function offsetGet(mixed $offset): mixed

View File

@ -1145,15 +1145,6 @@ abstract class InternalDoc
{
return $this->wrapper->getAPI()->loop($callback);
}
/**
* Escape string for markdown.
*
* @param string $hwat String to escape
*/
public static function markdownEscape(string $hwat): string
{
return \danog\MadelineProto\StrTools::markdownEscape($hwat);
}
/**
* Telegram UTF-8 multibyte split.
*
@ -1185,15 +1176,6 @@ abstract class InternalDoc
{
return \danog\MadelineProto\StrTools::mbSubstr($text, $offset, $length);
}
/**
* Escape method name.
*
* @param string $method Method name
*/
public static function methodEscape(string $method): string
{
return \danog\MadelineProto\StrTools::methodEscape($method);
}
/**
* Convert double to binary version.
*
@ -1577,15 +1559,6 @@ abstract class InternalDoc
{
return \danog\MadelineProto\MTProto::toSupergroup($id);
}
/**
* Escape type name.
*
* @param string $type String to escape
*/
public static function typeEscape(string $type): string
{
return \danog\MadelineProto\StrTools::typeEscape($type);
}
/**
* Unpack binary double.
*

View File

@ -94,11 +94,12 @@ final class WebRunner extends RunnerAbstract
return true;
}
public static function selfStart(string $uri): void {
public static function selfStart(string $uri): void
{
$payload = "GET $uri HTTP/1.1\r\nHost: {$_SERVER['SERVER_NAME']}\r\n\r\n";
foreach (($_SERVER['HTTPS'] ?? 'off') === 'on' ? ['tls', 'tcp'] : ['tcp', 'tls'] as $proto) {
foreach (array_unique([(int) $_SERVER['SERVER_PORT'], ($proto === 'tls' ? 443 : 80)]) as $port) {
foreach (\array_unique([(int) $_SERVER['SERVER_PORT'], ($proto === 'tls' ? 443 : 80)]) as $port) {
try {
$address = $proto.'://'.$_SERVER['SERVER_NAME'];
$res = \fsockopen($address, (int) $port);