mirror of
https://github.com/danog/MadelineProto.git
synced 2024-11-30 09:38:57 +01:00
Fix FromAdminOrOutgoing filter
This commit is contained in:
parent
2514334e6b
commit
385e067e85
@ -606,6 +606,20 @@ final class Blacklist {
|
||||
\fwrite($handle, "}\n");
|
||||
}
|
||||
\fclose($handle);
|
||||
|
||||
$handle = \fopen(__DIR__.'/EventHandler/SimpleFilters.php', 'w');
|
||||
\fwrite($handle, "<?php\n");
|
||||
\fwrite($handle, "/**\n");
|
||||
\fwrite($handle, " * This file is automatically generated by the build_docs.php file\n");
|
||||
\fwrite($handle, " * and is used only for autocompletion in multiple IDEs\n");
|
||||
\fwrite($handle, " * don't modify it manually.\n");
|
||||
\fwrite($handle, " */\n\n");
|
||||
\fwrite($handle, "namespace {$this->namespace}\\EventHandler;\n");
|
||||
\fwrite($handle, "/** @internal An internal interface used to avoid type errors when using simple filters. */\n");
|
||||
\fwrite($handle, "interface SimpleFilters extends ");
|
||||
/** @psalm-suppress UndefinedClass */
|
||||
\fwrite($handle, \implode(", ", \array_map(fn ($s) => "\\$s", ClassFinder::getClassesInNamespace(\danog\MadelineProto\EventHandler\SimpleFilter::class, ClassFinder::RECURSIVE_MODE|ClassFinder::ALLOW_INTERFACES))));
|
||||
\fwrite($handle, "{}\n");
|
||||
}
|
||||
|
||||
private function typeToStr(ReflectionType $type): string
|
||||
|
@ -29,27 +29,27 @@ final class DialogTopicEdited extends ServiceMessage
|
||||
array $rawMessage,
|
||||
array $info,
|
||||
|
||||
/**
|
||||
* If not null, indicates that the topic name has changed, contains the new topic name.
|
||||
*
|
||||
/**
|
||||
* If not null, indicates that the topic name has changed, contains the new topic name.
|
||||
*
|
||||
* Ignore this field if null.
|
||||
*/
|
||||
public readonly ?string $title,
|
||||
/**
|
||||
* If not null, indicates that the topic icon has changed, and contains the ID of the new [custom emoji](https://core.telegram.org/api/custom-emoji) used as topic icon (0 if it was removed).
|
||||
*
|
||||
*
|
||||
* Ignore this field if null.
|
||||
*/
|
||||
public readonly ?int $iconEmojiId,
|
||||
/**
|
||||
* If not null, indicates whether the topic was opened or closed.
|
||||
*
|
||||
* If not null, indicates whether the topic was opened or closed.
|
||||
*
|
||||
* Ignore this field if null.
|
||||
*/
|
||||
public readonly ?bool $closed,
|
||||
/**
|
||||
* If not null, indicates whether the topic was hidden or unhidden (only valid for the “General” topic, id=1).
|
||||
*
|
||||
/**
|
||||
* If not null, indicates whether the topic was hidden or unhidden (only valid for the “General” topic, id=1).
|
||||
*
|
||||
* Ignore this field if null.
|
||||
*/
|
||||
public readonly ?bool $hidden
|
||||
|
@ -1,44 +1,13 @@
|
||||
<?php declare(strict_types=1);
|
||||
|
||||
/**
|
||||
* This file is part of MadelineProto.
|
||||
* MadelineProto is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
* MadelineProto is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
* See the GNU Affero General Public License for more details.
|
||||
* You should have received a copy of the GNU General Public License along with MadelineProto.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* @author Daniil Gentili <daniil@daniil.it>
|
||||
* @copyright 2016-2023 Daniil Gentili <daniil@daniil.it>
|
||||
* @license https://opensource.org/licenses/AGPL-3.0 AGPLv3
|
||||
* @link https://docs.madelineproto.xyz MadelineProto documentation
|
||||
* This file is automatically generated by the build_docs.php file
|
||||
* and is used only for autocompletion in multiple IDEs
|
||||
* don't modify it manually.
|
||||
*/
|
||||
|
||||
namespace danog\MadelineProto\EventHandler;
|
||||
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\Ended;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\FromAdmin;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasAudio;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasDocument;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasDocumentPhoto;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasGif;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasMedia;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasNoMedia;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasPhoto;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasRoundVideo;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasSticker;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasVideo;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\HasVoice;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\Incoming;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\IsForwarded;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\IsReply;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\IsReplyToSelf;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\Outgoing;
|
||||
use danog\MadelineProto\EventHandler\SimpleFilter\Running;
|
||||
|
||||
/**
|
||||
* @internal An internal interface used to avoid type errors when using simple filters.
|
||||
*/
|
||||
interface SimpleFilters extends Incoming, Outgoing, FromAdmin, HasAudio, HasDocument, HasDocumentPhoto, HasGif, HasMedia, HasNoMedia, HasPhoto, HasRoundVideo, HasSticker, HasVideo, HasVoice, IsForwarded, IsReply, IsReplyToSelf, Ended, Running
|
||||
/** @internal An internal interface used to avoid type errors when using simple filters. */
|
||||
interface SimpleFilters extends \danog\MadelineProto\EventHandler\SimpleFilter\Ended, \danog\MadelineProto\EventHandler\SimpleFilter\FromAdmin, \danog\MadelineProto\EventHandler\SimpleFilter\FromAdminOrOutgoing, \danog\MadelineProto\EventHandler\SimpleFilter\HasAudio, \danog\MadelineProto\EventHandler\SimpleFilter\HasDocument, \danog\MadelineProto\EventHandler\SimpleFilter\HasDocumentPhoto, \danog\MadelineProto\EventHandler\SimpleFilter\HasGif, \danog\MadelineProto\EventHandler\SimpleFilter\HasMedia, \danog\MadelineProto\EventHandler\SimpleFilter\HasNoMedia, \danog\MadelineProto\EventHandler\SimpleFilter\HasPhoto, \danog\MadelineProto\EventHandler\SimpleFilter\HasRoundVideo, \danog\MadelineProto\EventHandler\SimpleFilter\HasSticker, \danog\MadelineProto\EventHandler\SimpleFilter\HasVideo, \danog\MadelineProto\EventHandler\SimpleFilter\HasVoice, \danog\MadelineProto\EventHandler\SimpleFilter\Incoming, \danog\MadelineProto\EventHandler\SimpleFilter\IsForwarded, \danog\MadelineProto\EventHandler\SimpleFilter\IsReply, \danog\MadelineProto\EventHandler\SimpleFilter\IsReplyToSelf, \danog\MadelineProto\EventHandler\SimpleFilter\Outgoing, \danog\MadelineProto\EventHandler\SimpleFilter\Running
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user