Skip to content

Commit

Permalink
Bot API 7.8
Browse files Browse the repository at this point in the history
  • Loading branch information
luzrain committed Aug 2, 2024
1 parent 8ebb941 commit ec75110
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# PHP Wrapper for Telegram Bot API

[![Bot Api 7.7](https://img.shields.io/badge/Bot%20API-7.7-0088cc.svg?style=flat)](https://core.telegram.org/bots/api-changelog#july-7-2024)
[![Bot Api 7.8](https://img.shields.io/badge/Bot%20API-7.8-0088cc.svg?style=flat)](https://core.telegram.org/bots/api-changelog#july-31-2024)
[![PHP >=8.2](https://img.shields.io/badge/PHP->=8.2-777bb3.svg?style=flat)](https://www.php.net/releases/8.2/en.php)
[![Tests Status](https://img.shields.io/github/actions/workflow/status/luzrain/telegram-bot-api/tests.yaml?branch=master)](../../actions/workflows/tests.yaml)

Expand Down
5 changes: 5 additions & 0 deletions src/Method/PinChatMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ public function __construct(
*/
protected int $messageId,

/**
* Unique identifier of the business connection on behalf of which the message will be pinned
*/
protected string|null $businessConnectionId = null,

/**
* Pass True if it is not necessary to send a notification to all chat members about the new pinned message.
* Notifications are always disabled in channels and private chats.
Expand Down
10 changes: 8 additions & 2 deletions src/Method/UnpinChatMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,15 @@ public function __construct(
protected int|string $chatId,

/**
* Identifier of a message to unpin. If not specified, the most recent pinned message (by sending date) will be unpinned.
* Identifier of the message to unpin. Required if business_connection_id is specified.
* If not specified, the most recent pinned message (by sending date) will be unpinned.
*/
protected int $messageId,
protected int|null $messageId = null,

/**
* Unique identifier of the business connection on behalf of which the message will be unpinned
*/
protected string|null $businessConnectionId = null,
) {
}
}
5 changes: 5 additions & 0 deletions src/Type/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ protected function __construct(
* Optional. True, if the bot can be connected to a Telegram Business account to receive its messages. Returned only in getMe.
*/
public bool|null $canConnectToBusiness = null,

/**
* Optional. True, if the bot has a main Web App. Returned only in getMe.
*/
public bool|null $hasMainWebApp = null,
) {
}
}

0 comments on commit ec75110

Please sign in to comment.