Skip to content

Commit 0db0479

Browse files
authored
Merge pull request #1267 from php-telegram-bot/api-5.5
Bot API 5.5
2 parents de3521c + ad044a0 commit 0db0479

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
88
- [:ledger: View file changes][Unreleased][:page_with_curl: DB migration script][unreleased-sql-migration]
99
### Added
1010
- Bot API 5.4. (@TiiFuchs, @noplanman) (#1266)
11+
- Bot API 5.5. (@TiiFuchs, @noplanman) (#1267)
1112
### Changed
1213
### Deprecated
1314
### Removed
15+
- [:exclamation:][unreleased-bc-removed-chatactions] Removed ChatAction::RECORD_AUDIO and ChatAction::UPLOAD_AUDIO since it is deprecated for a while now. Use RECORD_VOICE and UPLOAD_VOICE instead.
1416
### Fixed
1517
### Security
1618

@@ -539,6 +541,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
539541
- Move `hideKeyboard` to `removeKeyboard`.
540542

541543
[unreleased-sql-migration]: #
544+
[unreleased-bc-removed-chatactions]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#removed-deprecated-chatactions
542545
[0.74.0-bc-chatmember-subentities]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#chatmember-subentities
543546
[0.73.0-sql-migration]: https://github.com/php-telegram-bot/core/tree/master/utils/db-schema-update/0.72.0-0.73.0.sql
544547
[0.72.0-sql-migration]: https://github.com/php-telegram-bot/core/tree/master/utils/db-schema-update/0.71.0-0.72.0.sql

src/Entities/Chat.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,14 @@
2626
* @method string getLastName() Optional. Last name of the other party in a private chat
2727
* @method ChatPhoto getPhoto() Optional. Chat photo. Returned only in getChat.
2828
* @method string getBio() Optional. Bio of the other party in a private chat. Returned only in getChat.
29+
* @method bool getHasPrivateForwards() Optional. True, if privacy settings of the other party in the private chat allows to use tg://user?id=<user_id> links only in chats with the user. Returned only in getChat.
2930
* @method string getDescription() Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
3031
* @method string getInviteLink() Optional. Chat invite link, for groups, supergroups and channel chats. Each administrator in a chat generates their own invite links, so the bot must first generate the link using exportChatInviteLink. Returned only in getChat.
3132
* @method Message getPinnedMessage() Optional. Pinned message, for groups, supergroups and channels. Returned only in getChat.
3233
* @method ChatPermissions getPermissions() Optional. Default chat member permissions, for groups and supergroups. Returned only in getChat.
3334
* @method int getSlowModeDelay() Optional. For supergroups, the minimum allowed delay between consecutive messages sent by each unpriviledged user. Returned only in getChat.
35+
* @method int getMessageAutoDeleteTime() Optional. The time after which all messages sent to the chat will be automatically deleted; in seconds. Returned only in getChat.
36+
* @method bool getHasProtectedContent() Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
3437
* @method string getStickerSetName() Optional. For supergroups, name of group sticker set. Returned only in getChat.
3538
* @method bool getCanSetStickerSet() Optional. True, if the bot can change the group sticker set. Returned only in getChat.
3639
* @method int getLinkedChatId() Optional. Unique identifier for the linked chat. Returned only in getChat.

src/Entities/Message.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,11 @@
3434
* @method string getForwardSignature() Optional. For messages forwarded from channels, signature of the post author if present
3535
* @method string getForwardSenderName() Optional. Sender's name for messages forwarded from users who disallow adding a link to their account in forwarded messages
3636
* @method int getForwardDate() Optional. For forwarded messages, date the original message was sent in Unix time
37+
* @method bool getIsAutomaticForward() Optional. True, if the message is a channel post that was automatically forwarded to the connected discussion group
3738
* @method ReplyToMessage getReplyToMessage() Optional. For replies, the original message. Note that the Message object in this field will not contain further reply_to_message fields even if it itself is a reply.
3839
* @method User getViaBot() Optional. Bot through which the message was sent
3940
* @method int getEditDate() Optional. Date the message was last edited in Unix time
41+
* @method bool getHasProtectedContent() Optional. True, if the message can't be forwarded
4042
* @method string getMediaGroupId() Optional. The unique identifier of a media message group this message belongs to
4143
* @method string getAuthorSignature() Optional. Signature of the post author for messages in channels
4244
* @method MessageEntity[] getEntities() Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text

src/Request.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@
5959
* @method static ServerResponse restrictChatMember(array $data) Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all permissions to lift restrictions from a user. Returns True on success.
6060
* @method static ServerResponse promoteChatMember(array $data) Use this method to promote or demote a user in a supergroup or a channel. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Pass False for all boolean parameters to demote a user. Returns True on success.
6161
* @method static ServerResponse setChatAdministratorCustomTitle(array $data) Use this method to set a custom title for an administrator in a supergroup promoted by the bot. Returns True on success.
62+
* @method static ServerResponse banChatSenderChat(array $data) Use this method to ban a channel chat in a supergroup or a channel. Until the chat is unbanned, the owner of the banned chat won't be able to send messages on behalf of any of their channels. The bot must be an administrator in the supergroup or channel for this to work and must have the appropriate administrator rights. Returns True on success.
63+
* @method static ServerResponse unbanChatSenderChat(array $data) Use this method to unban a previously banned channel chat in a supergroup or channel. The bot must be an administrator for this to work and must have the appropriate administrator rights. Returns True on success.
6264
* @method static ServerResponse setChatPermissions(array $data) Use this method to set default chat permissions for all members. The bot must be an administrator in the group or a supergroup for this to work and must have the can_restrict_members admin rights. Returns True on success.
6365
* @method static ServerResponse exportChatInviteLink(array $data) Use this method to generate a new invite link for a chat. Any previously generated link is revoked. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns the new invite link as String on success.
6466
* @method static ServerResponse createChatInviteLink(array $data) Use this method to create an additional invite link for a chat. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. The link can be revoked using the method revokeChatInviteLink. Returns the new invite link as ChatInviteLink object.
@@ -201,6 +203,8 @@ class Request
201203
'restrictChatMember',
202204
'promoteChatMember',
203205
'setChatAdministratorCustomTitle',
206+
'banChatSenderChat',
207+
'unbanChatSenderChat',
204208
'setChatPermissions',
205209
'exportChatInviteLink',
206210
'createChatInviteLink',

0 commit comments

Comments
 (0)