Skip to content

Commit e7e3cd2

Browse files
committed
Set admin commands as private by default. (Breaking change!)
1 parent ba2c4b0 commit e7e3cd2

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
1313
- `Telegram::enableAdmin()` now handles duplicate additions properly.
1414
- `Request::getMe()` failure doesn't break cron execution any more.
1515
### Security
16-
- New command parameter `$private_only` to enforce usage in private chats only.
16+
- [:exclamation:][unreleased-private-only-admin-commands] New command parameter `$private_only` to enforce usage in private chats only (set by default for Admin commands).
1717

1818
## [0.46.0] - 2017-07-15
1919
### Added
@@ -133,6 +133,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
133133
### Deprecated
134134
- Move `hideKeyboard` to `removeKeyboard`.
135135

136+
[unreleased-private-only-admin-commands]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#private-only-admin-commands
136137
[0.46.0-bc-request-class-refactor]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#request-class-refactor
137138
[0.45.0-bc-remove-deprecated-methods]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#remove-deprecated-methods
138139
[0.45.0-bc-chats-params-array]: https://github.com/php-telegram-bot/core/wiki/Breaking-backwards-compatibility#chats-params-array

src/Commands/AdminCommand.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,8 @@
1212

1313
abstract class AdminCommand extends Command
1414
{
15-
15+
/**
16+
* @var bool
17+
*/
18+
protected $private_only = true;
1619
}

0 commit comments

Comments
 (0)