1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 02:14:38 +01:00

Rename some classes before release

This commit is contained in:
Daniil Gentili 2023-09-06 19:33:52 +02:00
parent aa6bccd456
commit 41de551a96
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
46 changed files with 129 additions and 119 deletions

2
docs

@ -1 +1 @@
Subproject commit 1af0095472c40f98ae4bdd4af7d741ce36839eaf
Subproject commit 355943bfe72fac6b1e42301a5c1db6f5a1029841

View File

@ -407,11 +407,6 @@
<code>new $class</code>
</UnsafeInstantiation>
</file>
<file src="src/EventHandler/AbstractAction.php">
<UnhandledMatchCondition>
<code>$type</code>
</UnhandledMatchCondition>
</file>
<file src="src/EventHandler/AbstractMessage.php">
<InvalidReturnStatement>
<code><![CDATA[$this->replyCache]]></code>
@ -438,6 +433,11 @@
<code><![CDATA[$client->wrapMessage($client->extractMessage($result))]]></code>
</NullableReturnStatement>
</file>
<file src="src/EventHandler/Action.php">
<UnhandledMatchCondition>
<code>$type</code>
</UnhandledMatchCondition>
</file>
<file src="src/EventHandler/Filter/AbstractFilterFromSender.php">
<PropertyNotSetInConstructor>
<code>$peerResolved</code>
@ -663,6 +663,11 @@
<code><![CDATA[$API->getIdInternal($rawParticipant['peer'])]]></code>
</PossiblyNullPropertyAssignmentValue>
</file>
<file src="src/EventHandler/Privacy.php">
<PropertyTypeCoercion>
<code><![CDATA[\array_map(RuleDestination::fromRawRule(...), $rawPrivacy['rules'])]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/EventHandler/Query/ChatTrait.php">
<MoreSpecificReturnType>
<code>Message</code>
@ -698,7 +703,7 @@
</PropertyNotSetInConstructor>
<PropertyTypeCoercion>
<code><![CDATA[$API->wrapMedia($rawStory['media'], $this->protected)]]></code>
<code><![CDATA[\array_map(AbstractRule::fromRawRule(...), $rawStory['privacy'] ?? [])]]></code>
<code><![CDATA[\array_map(RuleDestination::fromRawRule(...), $rawStory['privacy'] ?? [])]]></code>
</PropertyTypeCoercion>
</file>
<file src="src/EventHandler/User/Blocked.php">

View File

@ -51,7 +51,7 @@ final class API extends AbstractAPI
*
* @var string
*/
public const RELEASE = '8.0.0-beta144';
public const RELEASE = '8.0.0-beta145';
/**
* Secret chat was not found.
*

View File

@ -550,7 +550,7 @@ final class Blacklist {
$had = [];
foreach (ClassFinder::getClassesInNamespace(\danog\MadelineProto\EventHandler::class, ClassFinder::RECURSIVE_MODE) as $class) {
$name = \basename(\str_replace('\\', '//', $class));
if (isset($had[$name]) || $name === 'Status') {
if (isset($had[$name]) || $name === 'Status' || $name === 'Action') {
continue;
}
$had[$name] = true;

View File

@ -305,7 +305,7 @@ abstract class AbstractMessage extends Update implements SimpleFilters
*
* @return boolean
*/
public function setAction(AbstractAction $action = new Typing): bool
public function setAction(Action $action = new Typing): bool
{
$action = $action->toRawAction() + [ 'msg_id' => $this->id ];
return $this->getClient()->methodCallAsyncRead(

View File

@ -38,11 +38,12 @@ use ReflectionClass;
use ReflectionProperty;
/**
* Typing events.
* In-progress actions.
*/
abstract class AbstractAction implements JsonSerializable
abstract class Action implements JsonSerializable
{
public static function fromRawAction(array $rawAction): AbstractAction
/** @internal */
public static function fromRawAction(array $rawAction): Action
{
$type = $rawAction['_'];
if ($type === 'sendMessageEmojiInteraction') {
@ -73,6 +74,7 @@ abstract class AbstractAction implements JsonSerializable
};
}
/** @internal */
public function toRawAction(): array
{
return match (true) {

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* Invalidate all previous action updates. E.g. when user deletes entered text or aborts a video upload.
*/
final class Cancel extends AbstractAction
final class Cancel extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is selecting a contact to share.
*/
final class ChooseContact extends AbstractAction
final class ChooseContact extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is choosing a sticker.
*/
final class ChooseSticker extends AbstractAction
final class ChooseSticker extends Action
{
}

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is watching an animated emoji reaction triggered by another user, [click here for more info »](https://core.telegram.org/api/animated-emojis#emoji-reactions).
*/
final class EmojiSeen extends AbstractAction
final class EmojiSeen extends Action
{
public function __construct(
/** @var string Emoji */

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User has clicked on an animated emoji triggering a [reaction, click here for more info »](https://core.telegram.org/api/animated-emojis#emoji-reactions).
*/
final class EmojiTap extends AbstractAction
final class EmojiTap extends Action
{
public function __construct(
/** @var string Emoji */

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is playing a game.
*/
final class GamePlay extends AbstractAction
final class GamePlay extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is selecting a location to share.
*/
final class GeoLocation extends AbstractAction
final class GeoLocation extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is currently speaking in the group call.
*/
final class GroupCallSpeaking extends AbstractAction
final class GroupCallSpeaking extends Action
{
}

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* Chat history is being imported.
*/
final class HistoryImport extends AbstractAction
final class HistoryImport extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is recording a voice message.
*/
final class RecordAudio extends AbstractAction
final class RecordAudio extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is recording a round video to share.
*/
final class RecordRound extends AbstractAction
final class RecordRound extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is recording a video.
*/
final class RecordVideo extends AbstractAction
final class RecordVideo extends Action
{
}

View File

@ -16,11 +16,11 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is typing.
*/
final class Typing extends AbstractAction
final class Typing extends Action
{
}

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is uploading a voice message.
*/
final class UploadAudio extends AbstractAction
final class UploadAudio extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is uploading a file.
*/
final class UploadDocument extends AbstractAction
final class UploadDocument extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is uploading a photo.
*/
final class UploadPhoto extends AbstractAction
final class UploadPhoto extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is uploading a round video.
*/
final class UploadRound extends AbstractAction
final class UploadRound extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -16,12 +16,12 @@
namespace danog\MadelineProto\EventHandler\Action;
use danog\MadelineProto\EventHandler\AbstractAction;
use danog\MadelineProto\EventHandler\Action;
/**
* User is uploading a video.
*/
final class UploadVideo extends AbstractAction
final class UploadVideo extends Action
{
public function __construct(
/** @var ?int Progress percentage */

View File

@ -22,7 +22,7 @@ use danog\MadelineProto\MTProto;
/**
* Represents a service message about a group call.
*/
abstract class AbstractDialogGroupCall extends ServiceMessage
abstract class DialogGroupCall extends ServiceMessage
{
/** Group call ID */
public readonly int $callId;

View File

@ -16,13 +16,13 @@
namespace danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\MTProto;
/**
* The group call has started or ended.
*/
final class GroupCall extends AbstractDialogGroupCall
final class GroupCall extends DialogGroupCall
{
/** @var bool Whether that group call ended or not. */
public readonly bool $ended;

View File

@ -16,13 +16,13 @@
namespace danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\MTProto;
/**
* A set of users was invited to the group call.
*/
final class GroupCallInvited extends AbstractDialogGroupCall
final class GroupCallInvited extends DialogGroupCall
{
public function __construct(
MTProto $API,

View File

@ -16,13 +16,13 @@
namespace danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\AbstractDialogGroupCall;
use danog\MadelineProto\EventHandler\Message\Service\DialogGroupCall;
use danog\MadelineProto\MTProto;
/**
* A group call was scheduled.
*/
final class GroupCallScheduled extends AbstractDialogGroupCall
final class GroupCallScheduled extends DialogGroupCall
{
public function __construct(
MTProto $API,

View File

@ -16,8 +16,8 @@
namespace danog\MadelineProto\EventHandler;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\Key;
use danog\MadelineProto\EventHandler\Privacy\Rule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\MTProto;
/**
@ -26,16 +26,16 @@ use danog\MadelineProto\MTProto;
final class Privacy extends Update
{
/** New privacy rule. */
public readonly Key $key;
public readonly Rule $rule;
/** Peers to which the privacy rules apply */
public readonly array $rules;
/** @var list<RuleDestination> Peers to which the privacy rules apply */
public readonly array $appliesTo;
/** @internal */
public function __construct(MTProto $API, array $rawPrivacy)
{
parent::__construct($API);
$this->key = Key::fromRawKey($rawPrivacy['key']['_']);
$this->rules = \array_map(AbstractRule::fromRawRule(...), $rawPrivacy['rules']);
$this->rule = Rule::fromRawKey($rawPrivacy['key']['_']);
$this->appliesTo = \array_map(RuleDestination::fromRawRule(...), $rawPrivacy['rules']);
}
}

View File

@ -19,7 +19,8 @@ namespace danog\MadelineProto\EventHandler\Privacy;
use AssertionError;
use JsonSerializable;
enum Key: string implements JsonSerializable
/** Represents a privacy rule. */
enum Rule: string implements JsonSerializable
{
/** Whether we can see the last online timestamp of this user */
case STATUS_TIMESTAMP = 'privacyKeyStatusTimestamp';
@ -39,17 +40,17 @@ enum Key: string implements JsonSerializable
case ADDED_BY_PHONE = 'privacyKeyAddedByPhone';
/** Whether the user accepts voice messages */
case VOICE_MESSAGES = 'privacyKeyVoiceMessages';
/** Whether the user can see our bio. */
case ABOUT = 'privacyKeyAbout';
/**
*
* @internal
*
* @throws AssertionError
*/
public static function fromRawKey(string $key): Key
public static function fromRawKey(string $key): Rule
{
foreach (Key::cases() as $case) {
foreach (Rule::cases() as $case) {
if ($case->value === $key) {
return $case;
}

View File

@ -16,22 +16,25 @@
namespace danog\MadelineProto\EventHandler\Privacy;
use danog\MadelineProto\EventHandler\Privacy\Rule\AllowAll;
use danog\MadelineProto\EventHandler\Privacy\Rule\AllowChatParticipants;
use danog\MadelineProto\EventHandler\Privacy\Rule\AllowCloseFriends;
use danog\MadelineProto\EventHandler\Privacy\Rule\AllowContacts;
use danog\MadelineProto\EventHandler\Privacy\Rule\AllowUsers;
use danog\MadelineProto\EventHandler\Privacy\Rule\DisallowAll;
use danog\MadelineProto\EventHandler\Privacy\Rule\DisallowChatParticipants;
use danog\MadelineProto\EventHandler\Privacy\Rule\DisallowContacts;
use danog\MadelineProto\EventHandler\Privacy\Rule\DisallowUsers;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\AllowAll;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\AllowChatParticipants;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\AllowCloseFriends;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\AllowContacts;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\AllowUsers;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\DisallowAll;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\DisallowChatParticipants;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\DisallowContacts;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination\DisallowUsers;
use JsonSerializable;
use ReflectionClass;
use ReflectionProperty;
abstract class AbstractRule implements JsonSerializable
/**
* To whom does a privacy rule apply?
*/
abstract class RuleDestination implements JsonSerializable
{
public static function fromRawRule(array $rawRule): AbstractRule
public static function fromRawRule(array $rawRule): RuleDestination
{
return match ($rawRule['_']) {
'privacyValueAllowAll' => new AllowAll,

View File

@ -14,13 +14,13 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Allow all users.
*/
final class AllowAll extends AbstractRule
final class AllowAll extends RuleDestination
{
}

View File

@ -14,14 +14,14 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Allow all participants of certain chats.
*/
final class AllowChatParticipants extends AbstractRule
final class AllowChatParticipants extends RuleDestination
{
/** Allowed chats */
public readonly array $chats;

View File

@ -14,10 +14,10 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
final class AllowCloseFriends extends AbstractRule
final class AllowCloseFriends extends RuleDestination
{
}

View File

@ -14,13 +14,13 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Allow all contacts.
*/
final class AllowContacts extends AbstractRule
final class AllowContacts extends RuleDestination
{
}

View File

@ -14,14 +14,14 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Allow only certain user.
*/
final class AllowUsers extends AbstractRule
final class AllowUsers extends RuleDestination
{
/** Allowed users */
public readonly array $users;

View File

@ -14,13 +14,13 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Disallow all users.
*/
final class DisallowAll extends AbstractRule
final class DisallowAll extends RuleDestination
{
}

View File

@ -14,14 +14,14 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Disallow only participants of certain chats.
*/
final class DisallowChatParticipants extends AbstractRule
final class DisallowChatParticipants extends RuleDestination
{
/** Allowed chats */
public readonly array $chats;

View File

@ -14,13 +14,13 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Disallow only contacts.
*/
final class DisallowContacts extends AbstractRule
final class DisallowContacts extends RuleDestination
{
}

View File

@ -14,14 +14,14 @@
* @link https://docs.madelineproto.xyz MadelineProto documentation
*/
namespace danog\MadelineProto\EventHandler\Privacy\Rule;
namespace danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
/**
* Disallow only certain users.
*/
final class DisallowUsers extends AbstractRule
final class DisallowUsers extends RuleDestination
{
/** Allowed users */
public readonly array $users;

View File

@ -24,7 +24,7 @@ use danog\MadelineProto\EventHandler\Media\Video;
use danog\MadelineProto\EventHandler\Message;
use danog\MadelineProto\EventHandler\Message\Entities\MessageEntity;
use danog\MadelineProto\EventHandler\Message\ReportReason;
use danog\MadelineProto\EventHandler\Privacy\AbstractRule;
use danog\MadelineProto\EventHandler\Privacy\RuleDestination;
use danog\MadelineProto\Ipc\Client;
use danog\MadelineProto\MTProto;
use danog\MadelineProto\ParseMode;
@ -74,7 +74,7 @@ final class Story extends AbstractStory
/** A set of physical coordinates associated to this story */
//public readonly ?array $mediaAreas; //!
/** @var list<AbstractRule> */
/** @var list<RuleDestination> */
public readonly array $privacy;
/** Our reaction to the story */
@ -113,7 +113,7 @@ final class Story extends AbstractStory
$this->media = $API->wrapMedia($rawStory['media'], $this->protected);
$this->entities = MessageEntity::fromRawEntities($rawStory['entities'] ?? []);
$this->privacy = \array_map(AbstractRule::fromRawRule(...), $rawStory['privacy'] ?? []);
$this->privacy = \array_map(RuleDestination::fromRawRule(...), $rawStory['privacy'] ?? []);
$this->recentViewers = $rawStory['views']['recent_viewers'] ?? [];
$this->views = $rawStory['views']['views_count'] ?? null;

View File

@ -21,19 +21,19 @@ use danog\MadelineProto\MTProto;
/**
* A user is typing.
*/
abstract class AbstractTyping extends Update
abstract class Typing extends Update
{
/** @var int The user id that is typing. */
public readonly int $userId;
/** @var AbstractAction Whether the user is typing, sending a media or doing something else. */
public readonly AbstractAction $action;
/** @var Action Whether the user is typing, sending a media or doing something else. */
public readonly Action $action;
/** @internal */
public function __construct(MTProto $API, array $rawTyping)
{
parent::__construct($API);
$this->userId = $rawTyping['user_id'] ?? $API->getIdInternal($rawTyping['from_id']);
$this->action = AbstractAction::fromRawAction($rawTyping['action']);
$this->action = Action::fromRawAction($rawTyping['action']);
}
}

View File

@ -16,14 +16,14 @@
namespace danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\EventHandler\AbstractTyping;
use danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\MTProto;
use danog\MadelineProto\MTProtoTools\DialogId;
/**
* A user is typing in a [supergroup](https://core.telegram.org/api/channel).
*/
final class SupergroupUserTyping extends AbstractTyping
final class SupergroupUserTyping extends Typing
{
/** @var int Channel ID. */
public readonly int $chatId;

View File

@ -16,13 +16,13 @@
namespace danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\EventHandler\AbstractTyping;
use danog\MadelineProto\EventHandler\Typing;
use danog\MadelineProto\MTProto;
/**
* The user is preparing a message; typing, recording, uploading, etc. This update is valid for 6 seconds. If no further updates of this kind are received after 6 seconds, it should be considered that the user stopped doing whatever they were doing.
*/
final class UserTyping extends AbstractTyping
final class UserTyping extends Typing
{
/** @internal */
public function __construct(MTProto $API, array $rawTyping)

View File

@ -20,7 +20,7 @@ use danog\MadelineProto\EventHandler\User\Status;
use danog\MadelineProto\MTProto;
/**
* The [emoji status](https://core.telegram.org/api/emoji-status) of a certain user has changed or removed.
* The [emoji status](https://core.telegram.org/api/emoji-status) of a certain user has changed or was removed.
*/
final class Emoji extends Status
{

View File

@ -37,7 +37,6 @@ use danog\MadelineProto\EventHandler\Message\Entities\Spoiler;
use danog\MadelineProto\EventHandler\Message\Entities\Url;
use danog\MadelineProto\EventHandler\Participant\Admin;
use danog\MadelineProto\EventHandler\Participant\Member;
use danog\MadelineProto\EventHandler\Privacy\Key;
use danog\MadelineProto\EventHandler\Update;
use danog\MadelineProto\EventHandler\User\Status\Emoji;
use danog\MadelineProto\EventHandler\User\Username;