. * * @author Amir Hossein Jafari * @copyright 2016-2023 Amir Hossein Jafari * @license https://opensource.org/licenses/AGPL-3.0 AGPLv3 * @link https://docs.madelineproto.xyz MadelineProto documentation */ namespace danog\MadelineProto\EventHandler; use danog\MadelineProto\MTProto; /** * Indicates that some messages were pinned/unpinned. */ abstract class Pinned extends Update { /** Whether the messages were pinned or unpinned. */ public readonly bool $pinned; /** @var list List of identifiers of pinned messages. */ public readonly array $ids; /** ID of the chat where the messages were pinned. */ public readonly int $chatId; /** @internal */ public function __construct(MTProto $API, array $rawPinned) { parent::__construct($API); $this->pinned = $rawPinned['pinned']; $this->ids = $rawPinned['messages']; $this->chatId = $API->getIdInternal($rawPinned); } }