@@ -6,10 +6,16 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
## [Unreleased]
### Added
- Documents can be sent by providing its contents via Psr7 stream (as opposed to passing a file path).
- Allow setting a custom Guzzle HTTP Client for requests (#511).
- First implementations towards Bots API 3.0.
### Changed
-[:exclamation:][unreleased-bc-chats-params-array]`Request::sendToActiveChats` and `DB::selectChats` now accept parameters as an options array.
### Deprecated
### Removed
-[:exclamation:][unreleased-bc-up-download-directory] Upload and download directories are not set any more by default and must be set manually.
### Fixed
- ID fields are now typed with `PARAM_STR` PDO data type, to allow huge numbers.
- Message type data type for PDO corrected.
- Indexed table columns now have a fitting length.
### Security
...
...
@@ -26,7 +32,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Removed
- All examples have been moved to a [dedicated repository](https://github.com/php-telegram-bot/example-bot).
### Fixed
-[:exclamation:](https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#0440) Format of Update content type using `$update->getUpdateContent()`.
-[:exclamation:][0.44.0-bc-update-content-type] Format of Update content type using `$update->getUpdateContent()`.
## [0.43.0] - 2017-04-17
### Added
...
...
@@ -101,3 +107,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :date) as LIMIT_PER_SEC_ALL,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE ((`chat_id` = :chat_id AND `inline_message_id` IS NULL) OR (`inline_message_id` = :inline_message_id AND `chat_id` IS NULL)) AND `created_at` >= :date) as LIMIT_PER_SEC,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `chat_id` = :chat_id AND `created_at` >= :date_minute) as LIMIT_PER_MINUTE
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_1) as LIMIT_PER_SEC_ALL,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_2 AND ((`chat_id` = :chat_id_1 AND `inline_message_id` IS NULL) OR (`inline_message_id` = :inline_message_id AND `chat_id` IS NULL))) as LIMIT_PER_SEC,
(SELECT COUNT(*) FROM `'.TB_REQUEST_LIMITER.'` WHERE `created_at` >= :created_at_minute AND `chat_id` = :chat_id_2) as LIMIT_PER_MINUTE
* @method int getMessageId() Unique message identifier
* @method User getFrom() Optional. Sender, can be empty for messages sent to channels
* @method int getDate() Date the message was sent in Unix time
* @method Chat getChat() Conversation the message belongs to
* @method User getForwardFrom() Optional. For forwarded messages, sender of the original message
* @method Chat getForwardFromChat() Optional. For messages forwarded from a channel, information about the original channel
* @method int getForwardFromMessageId() Optional. For forwarded channel posts, identifier of the original message in the channel
* @method int getForwardDate() Optional. For forwarded messages, date the original message was sent in Unix time
* @method Message 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.
* @method int getEditDate() Optional. Date the message was last edited in Unix time
* @method Audio getAudio() Optional. Message is an audio file, information about the file
* @method Document getDocument() Optional. Message is a general file, information about the file
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
* @method Video getVideo() Optional. Message is a video, information about the video
* @method Voice getVoice() Optional. Message is a voice message, information about the file
* @method string getCaption() Optional. Caption for the document, photo or video, 0-200 characters
* @method Contact getContact() Optional. Message is a shared contact, information about the contact
* @method Location getLocation() Optional. Message is a shared location, information about the location
* @method Venue getVenue() Optional. Message is a venue, information about the venue
* @method User getNewChatMember() Optional. A new member was added to the group, information about them (this member may be the bot itself)
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
* @method string getNewChatTitle() Optional. A chat title was changed to this value
* @method bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
* @method bool getGroupChatCreated() Optional. Service message: the group has been created
* @method bool getSupergroupChatCreated() Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
* @method bool getChannelChatCreated() Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
* @method int getMigrateToChatId() Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
* @method int getMigrateFromChatId() Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
* @method Message getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
* @method int getMessageId() Unique message identifier
* @method User getFrom() Optional. Sender, can be empty for messages sent to channels
* @method int getDate() Date the message was sent in Unix time
* @method Chat getChat() Conversation the message belongs to
* @method User getForwardFrom() Optional. For forwarded messages, sender of the original message
* @method Chat getForwardFromChat() Optional. For messages forwarded from a channel, information about the original channel
* @method int getForwardFromMessageId() Optional. For forwarded channel posts, identifier of the original message in the channel
* @method int getForwardDate() Optional. For forwarded messages, date the original message was sent in Unix time
* @method Message 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.
* @method int getEditDate() Optional. Date the message was last edited in Unix time
* @method Audio getAudio() Optional. Message is an audio file, information about the file
* @method Document getDocument() Optional. Message is a general file, information about the file
* @method Sticker getSticker() Optional. Message is a sticker, information about the sticker
* @method Video getVideo() Optional. Message is a video, information about the video
* @method Voice getVoice() Optional. Message is a voice message, information about the file
* @method Video Note getVideoNote() Optional. Message is a video note message, information about the video
* @method string getCaption() Optional. Caption for the document, photo or video, 0-200 characters
* @method Contact getContact() Optional. Message is a shared contact, information about the contact
* @method Location getLocation() Optional. Message is a shared location, information about the location
* @method Venue getVenue() Optional. Message is a venue, information about the venue
* @method User getLeftChatMember() Optional. A member was removed from the group, information about them (this member may be the bot itself)
* @method string getNewChatTitle() Optional. A chat title was changed to this value
* @method bool getDeleteChatPhoto() Optional. Service message: the chat photo was deleted
* @method bool getGroupChatCreated() Optional. Service message: the group has been created
* @method bool getSupergroupChatCreated() Optional. Service message: the supergroup has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a supergroup when it is created. It can only be found in reply_to_message if someone replies to a very first message in a directly created supergroup.
* @method bool getChannelChatCreated() Optional. Service message: the channel has been created. This field can't be received in a message coming through updates, because bot can’t be a member of a channel when it is created. It can only be found in reply_to_message if someone replies to a very first message in a channel.
* @method int getMigrateToChatId() Optional. The group has been migrated to a supergroup with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
* @method int getMigrateFromChatId() Optional. The supergroup has been migrated from a group with the specified identifier. This number may be greater than 32 bits and some programming languages may have difficulty/silent defects in interpreting it. But it smaller than 52 bits, so a signed 64 bit integer or double-precision float type are safe for storing this identifier.
* @method Message getPinnedMessage() Optional. Specified message was pinned. Note that the Message object in this field will not contain further reply_to_message fields even if it is itself a reply.
`language_code`CHAR(10)DEFAULTNULLCOMMENT'User''s system language',
`created_at`timestampNULLDEFAULTNULLCOMMENT'Entry date creation',
`updated_at`timestampNULLDEFAULTNULLCOMMENT'Entry date update',
...
...
@@ -82,19 +83,20 @@ CREATE TABLE IF NOT EXISTS `message` (
`sticker`TEXTCOMMENT'Sticker object. Message is a sticker, information about the sticker',
`video`TEXTCOMMENT'Video object. Message is a video, information about the video',
`voice`TEXTCOMMENT'Voice Object. Message is a Voice, information about the Voice',
`video_note`TEXTCOMMENT'VoiceNote Object. Message is a Video Note, information about the Video Note',
`contact`TEXTCOMMENT'Contact object. Message is a shared contact, information about the contact',
`location`TEXTCOMMENT'Location object. Message is a shared location, information about the location',
`venue`TEXTCOMMENT'Venue object. Message is a Venue, information about the Venue',
`caption`TEXTCOMMENT'For message with caption, the actual UTF-8 text of the caption',
`new_chat_member`bigintNULLDEFAULTNULLCOMMENT'Unique user identifier, a new member was added to the group, information about them (this member may be bot itself)',
`left_chat_member`bigintNULLDEFAULTNULLCOMMENT'Unique user identifier, a member was removed from the group, information about them (this member may be bot itself)',
`new_chat_members`TEXTCOMMENT'List of unique user identifiers, new member(s) were added to the group, information about them (one of these members may be the bot itself)',
`left_chat_member`bigintNULLDEFAULTNULLCOMMENT'Unique user identifier, a member was removed from the group, information about them (this member may be the bot itself)',
`new_chat_title`CHAR(255)DEFAULTNULLCOMMENT'A chat title was changed to this value',
`new_chat_photo`TEXTCOMMENT'Array of PhotoSize objects. A chat photo was change to this value',
`delete_chat_photo`tinyint(1)DEFAULT0COMMENT'Informs that the chat photo was deleted',
`group_chat_created`tinyint(1)DEFAULT0COMMENT'Informs that the group has been created',
`supergroup_chat_created`tinyint(1)DEFAULT0COMMENT'Informs that the supergroup has been created',
`channel_chat_created`tinyint(1)DEFAULT0COMMENT'Informs that the channel chat has been created',
`migrate_to_chat_id`bigintNULLDEFAULTNULLCOMMENT'Migrate to chat identifier. The group has been migrated to a supergroup with the specified identifie',
`migrate_to_chat_id`bigintNULLDEFAULTNULLCOMMENT'Migrate to chat identifier. The group has been migrated to a supergroup with the specified identifier',
`migrate_from_chat_id`bigintNULLDEFAULTNULLCOMMENT'Migrate from chat identifier. The supergroup has been migrated from a group with the specified identifier',
`pinned_message`TEXTNULLCOMMENT'Message object. Specified message was pinned',
...
...
@@ -104,7 +106,6 @@ CREATE TABLE IF NOT EXISTS `message` (
ALTERTABLE`message`ADDCOLUMN`new_chat_members`TEXTCOMMENT'List of unique user identifiers, new member(s) were added to the group, information about them (one of these members may be the bot itself)'AFTER`new_chat_member`;