Skip to content

Commit 260cd05

Browse files
committed
Renamed the fields voice_chat_scheduled, voice_chat_started, voice_chat_ended, and voice_chat_participants_invited to video_chat_scheduled, video_chat_started, video_chat_ended, and video_chat_participants_invited in the class Message. The old fields will remain temporarily available.
Old classes are deprecated
1 parent 048405b commit 260cd05

9 files changed

+122
-12
lines changed

src/Entities/Message.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@
7575
* @method string getConnectedWebsite() Optional. The domain name of the website on which the user has logged in.
7676
* @method PassportData getPassportData() Optional. Telegram Passport data
7777
* @method ProximityAlertTriggered getProximityAlertTriggered() Optional. Service message. A user in the chat triggered another user's proximity alert while sharing Live Location.
78-
* @method VoiceChatScheduled getVoiceChatScheduled() Optional. Service message: voice chat scheduled
79-
* @method VoiceChatStarted getVoiceChatStarted() Optional. Service message: voice chat started
80-
* @method VoiceChatEnded getVoiceChatEnded() Optional. Service message: voice chat ended
81-
* @method VoiceChatParticipantsInvited getVoiceChatParticipantsInvited() Optional. Service message: new participants invited to a voice chat
78+
* @method VideoChatScheduled getVideoChatScheduled() Optional. Service message: voice chat scheduled
79+
* @method VideoChatStarted getVideoChatStarted() Optional. Service message: voice chat started
80+
* @method VideoChatEnded getVideoChatEnded() Optional. Service message: voice chat ended
81+
* @method VideoChatParticipantsInvited getVideoChatParticipantsInvited() Optional. Service message: new participants invited to a voice chat
8282
* @method WebAppData getWebAppData() Optional. Service message: data sent by a Web App
8383
* @method InlineKeyboard getReplyMarkup() Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
8484
*/
@@ -122,10 +122,10 @@ protected function subEntities(): array
122122
'successful_payment' => SuccessfulPayment::class,
123123
'passport_data' => PassportData::class,
124124
'proximity_alert_triggered' => ProximityAlertTriggered::class,
125-
'voice_chat_scheduled' => VoiceChatScheduled::class,
126-
'voice_chat_started' => VoiceChatStarted::class,
127-
'voice_chat_ended' => VoiceChatEnded::class,
128-
'voice_chat_participants_invited' => VoiceChatParticipantsInvited::class,
125+
'video_chat_scheduled' => VideoChatScheduled::class,
126+
'video_chat_started' => VideoChatStarted::class,
127+
'video_chat_ended' => VideoChatEnded::class,
128+
'video_chat_participants_invited' => VideoChatParticipantsInvited::class,
129129
'web_app_data' => WebAppData::class,
130130
'reply_markup' => InlineKeyboard::class,
131131
];
@@ -258,10 +258,10 @@ public function getType(): string
258258
'successful_payment',
259259
'passport_data',
260260
'proximity_alert_triggered',
261-
'voice_chat_scheduled',
262-
'voice_chat_started',
263-
'voice_chat_ended',
264-
'voice_chat_participants_invited',
261+
'video_chat_scheduled',
262+
'video_chat_started',
263+
'video_chat_ended',
264+
'video_chat_participants_invited',
265265
'web_app_data',
266266
'reply_markup',
267267
];

src/Entities/VideoChatEnded.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the TelegramBot package.
5+
*
6+
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Longman\TelegramBot\Entities;
13+
14+
/**
15+
* This object represents a service message about a video chat ended in the chat.
16+
*
17+
* @link https://core.telegram.org/bots/api#videochatended
18+
*
19+
* @method int getDuration() Video chat duration in seconds
20+
*/
21+
class VideoChatEnded extends Entity
22+
{
23+
24+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the TelegramBot package.
5+
*
6+
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Longman\TelegramBot\Entities;
13+
14+
/**
15+
* This object represents a service message about new members invited to a video chat.
16+
*
17+
* @link https://core.telegram.org/bots/api#videochatparticipantsinvited
18+
*
19+
* @method User[] getUsers() New members that were invited to the video chat
20+
*/
21+
class VideoChatParticipantsInvited extends Entity
22+
{
23+
/**
24+
* {@inheritdoc}
25+
*/
26+
protected function subEntities(): array
27+
{
28+
return [
29+
'users' => [User::class],
30+
];
31+
}
32+
}

src/Entities/VideoChatScheduled.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the TelegramBot package.
5+
*
6+
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Longman\TelegramBot\Entities;
13+
14+
/**
15+
* This object represents a service message about a video chat scheduled in the chat.
16+
*
17+
* @link https://core.telegram.org/bots/api#videochatscheduled
18+
*
19+
* @method int getStartDate() Point in time (Unix timestamp) when the video chat is supposed to be started by a chat administrator
20+
*/
21+
class VideoChatScheduled extends Entity
22+
{
23+
24+
}

src/Entities/VideoChatStarted.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
/**
4+
* This file is part of the TelegramBot package.
5+
*
6+
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
12+
namespace Longman\TelegramBot\Entities;
13+
14+
/**
15+
* This object represents a service message about a video chat started in the chat. Currently holds no information.
16+
*
17+
* @link https://core.telegram.org/bots/api#videochatstarted
18+
*/
19+
class VideoChatStarted extends Entity
20+
{
21+
22+
}

src/Entities/VoiceChatEnded.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
* Represents a service message about new members invited to a voice chat
1818
*
19+
* @deprecated See VideoChatEnded instead
20+
*
1921
* @link https://core.telegram.org/bots/api#voicechatended
2022
*
2123
* @method int getDuration() Voice chat duration; in seconds

src/Entities/VoiceChatParticipantsInvited.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
* Represents a service message about new members invited to a voice chat
1818
*
19+
* @deprecated See VideoChatParticipantsInvited instead
20+
*
1921
* @link https://core.telegram.org/bots/api#voicechatparticipantsinvited
2022
*
2123
* @method User[] getUsers() Optional. New members that were invited to the voice chat

src/Entities/VoiceChatScheduled.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
* Represents a service message about a voice chat scheduled in the chat.
1818
*
19+
* @deprecated See VideoChatScheduled instead
20+
*
1921
* @link https://core.telegram.org/bots/api#voicechatscheduled
2022
*
2123
* @method int getStartDate() Point in time (Unix timestamp) when the voice chat is supposed to be started by a chat administrator

src/Entities/VoiceChatStarted.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*
1717
* Represents a service message about a voice chat started in the chat
1818
*
19+
* @deprecated See VideoChatStarted instead
20+
*
1921
* @link https://core.telegram.org/bots/api#voicechatstarted
2022
*/
2123
class VoiceChatStarted extends Entity

0 commit comments

Comments
 (0)