Skip to content

Commit

Permalink
Merge pull request #439 from fonclub/patch-1
Browse files Browse the repository at this point in the history
Unpin message by Id
  • Loading branch information
BoShurik authored Aug 9, 2023
2 parents 8b5c551 + d66f4cf commit 65f9b4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All Notable changes to `PHP Telegram Bot Api` will be documented in this file
- Fix phpDoc for `\TelegramBot\Api\Types\Message::$newChatMembers`
- Add `\TelegramBot\Api\BotApi::getChatMemberCount` method
- Add `\TelegramBot\Api\BotApi::banChatMember` method
- Add `$messageId` to `\TelegramBot\Api\BotApi::unpinChatMessage`

### Deprecated
- Deprecate using `thumb*` methods in `\TelegramBot\Api\BotApi`
Expand Down
6 changes: 4 additions & 2 deletions src/BotApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -2227,14 +2227,16 @@ public function pinChatMessage($chatId, $messageId, $disableNotification = false
*
* @param string|int $chatId Unique identifier for the target chat or username of the target channel
* (in the format @channelusername)
* @param int|null $messageId Identifier of a message to pin (optional)
*
* @return bool
* @throws Exception
*/
public function unpinChatMessage($chatId)
public function unpinChatMessage($chatId, $messageId = null)
{
return $this->call('unpinChatMessage', [
'chat_id' => $chatId
'chat_id' => $chatId,
'message_id' => $messageId,
]);
}

Expand Down

0 comments on commit 65f9b4a

Please sign in to comment.