@@ -37,7 +37,16 @@ class Chat extends BaseType implements TypeInterface
3737 'sticker_set_name ' => true ,
3838 'can_set_sticker_set ' => true ,
3939 'linked_chat_id ' => true ,
40- 'location ' => ChatLocation::class
40+ 'location ' => ChatLocation::class,
41+ 'join_to_send_messages ' => true ,
42+ 'join_by_request ' => true ,
43+ 'message_auto_delete_time ' => true ,
44+ 'has_protected_content ' => true ,
45+ 'is_forum ' => true ,
46+ 'active_usernames ' => true ,
47+ 'emoji_status_custom_emoji_id ' => true ,
48+ 'has_private_forwards ' => true ,
49+ 'has_restricted_voice_and_video_messages ' => true ,
4150 ];
4251
4352 /**
@@ -163,6 +172,74 @@ class Chat extends BaseType implements TypeInterface
163172 */
164173 protected $ location ;
165174
175+ /**
176+ * Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
177+ *
178+ * @var bool
179+ */
180+ protected $ joinToSendMessages ;
181+
182+ /**
183+ * Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators. Returned only in getChat.
184+ *
185+ * @var bool
186+ */
187+ protected $ joinByRequest ;
188+
189+ /**
190+ * Optional. Time after which all messages sent to the chat will be automatically deleted; in seconds. Returned
191+ * only in getChat.
192+ *
193+ * @var int
194+ */
195+ protected $ messageAutoDeleteTime ;
196+
197+ /**
198+ * Optional. True, if messages from the chat can't be forwarded to other chats. Returned only in getChat.
199+ *
200+ * @var bool
201+ */
202+ protected $ hasProtectedContent ;
203+
204+ /**
205+ * Optional. True, if the supergroup chat is a forum (has topics enabled)
206+ *
207+ * @var bool
208+ */
209+ protected $ isForum ;
210+
211+ /**
212+ * Optional. If non-empty, the list of all active chat usernames;
213+ * for private chats, supergroups and channels. Returned only in getChat.
214+ *
215+ * @var array[]
216+ */
217+ protected $ activeUsernames ;
218+
219+ /**
220+ * Optional. Custom emoji identifier of emoji status of the other party in a private chat. Returned only in getChat.
221+ *
222+ * @var string
223+ */
224+ protected $ emojiStatusCustomEmojiId ;
225+
226+ /**
227+ * Optional. True, if privacy settings of the other party in the private chat allows
228+ * to use tg://user?id=<user_id> links only in chats with the user.
229+ * Returned only in getChat.
230+ *
231+ * @var bool
232+ */
233+ protected $ hasPrivateForwards ;
234+
235+ /**
236+ * Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the private chat.
237+ * Returned only in getChat.
238+ *
239+ * @var bool
240+ */
241+ protected $ hasRestrictedVoiceAndVideoMessages ;
242+
166243 /**
167244 * @return int|string
168245 */
@@ -396,7 +473,7 @@ public function setStickerSetName($stickerSetName)
396473 /**
397474 * @return bool
398475 */
399- public function isCanSetStickerSet ()
476+ public function getCanSetStickerSet ()
400477 {
401478 return $ this ->canSetStickerSet ;
402479 }
@@ -440,4 +517,148 @@ public function setLocation($location)
440517 {
441518 $ this ->location = $ location ;
442519 }
520+
521+ /**
522+ * @return bool
523+ */
524+ public function getJoinToSendMessages ()
525+ {
526+ return $ this ->joinToSendMessages ;
527+ }
528+
529+ /**
530+ * @param bool $joinToSendMessages
531+ */
532+ public function setJoinToSendMessages ($ joinToSendMessages )
533+ {
534+ $ this ->joinToSendMessages = $ joinToSendMessages ;
535+ }
536+
537+ /**
538+ * @return bool
539+ */
540+ public function getJoinByRequest ()
541+ {
542+ return $ this ->joinByRequest ;
543+ }
544+
545+ /**
546+ * @param bool $joinByRequest
547+ */
548+ public function setJoinByRequest ($ joinByRequest )
549+ {
550+ $ this ->joinByRequest = $ joinByRequest ;
551+ }
552+
553+ /**
554+ * @return int
555+ */
556+ public function getMessageAutoDeleteTime ()
557+ {
558+ return $ this ->messageAutoDeleteTime ;
559+ }
560+
561+ /**
562+ * @param int $messageAutoDeleteTime
563+ */
564+ public function setMessageAutoDeleteTime ($ messageAutoDeleteTime )
565+ {
566+ $ this ->messageAutoDeleteTime = $ messageAutoDeleteTime ;
567+ }
568+
569+ /**
570+ * @return bool
571+ */
572+ public function getHasProtectedContent ()
573+ {
574+ return $ this ->hasProtectedContent ;
575+ }
576+
577+ /**
578+ * @param bool $hasProtectedContent
579+ */
580+ public function setHasProtectedContent ($ hasProtectedContent )
581+ {
582+ $ this ->hasProtectedContent = $ hasProtectedContent ;
583+ }
584+
585+ /**
586+ * @return bool
587+ */
588+ public function getIsForum ()
589+ {
590+ return $ this ->isForum ;
591+ }
592+
593+ /**
594+ * @param bool $isForum
595+ */
596+ public function setIsForum ($ isForum )
597+ {
598+ $ this ->isForum = $ isForum ;
599+ }
600+
601+ /**
602+ * @return array
603+ */
604+ public function getActiveUsernames ()
605+ {
606+ return $ this ->activeUsernames ;
607+ }
608+
609+ /**
610+ * @param array $activeUsernames
611+ */
612+ public function setActiveUsernames ($ activeUsernames )
613+ {
614+ $ this ->activeUsernames = $ activeUsernames ;
615+ }
616+
617+ /**
618+ * @return bool
619+ */
620+ public function getEmojiStatusCustomEmojiId ()
621+ {
622+ return $ this ->emojiStatusCustomEmojiId ;
623+ }
624+
625+ /**
626+ * @param bool $emojiStatusCustomEmojiId
627+ */
628+ public function setEmojiStatusCustomEmojiId ($ emojiStatusCustomEmojiId )
629+ {
630+ $ this ->emojiStatusCustomEmojiId = $ emojiStatusCustomEmojiId ;
631+ }
632+
633+ /**
634+ * @return bool
635+ */
636+ public function getHasPrivateForwards ()
637+ {
638+ return $ this ->hasPrivateForwards ;
639+ }
640+
641+ /**
642+ * @param bool $hasPrivateForwards
643+ */
644+ public function setHasPrivateForwards ($ hasPrivateForwards )
645+ {
646+ $ this ->hasPrivateForwards = $ hasPrivateForwards ;
647+ }
648+
649+ /**
650+ * @return bool
651+ */
652+ public function getHasRestrictedVoiceAndVideoMessages ()
653+ {
654+ return $ this ->hasRestrictedVoiceAndVideoMessages ;
655+ }
656+
657+ /**
658+ * @param bool $hasRestrictedVoiceAndVideoMessages
659+ */
660+ public function setHasRestrictedVoiceAndVideoMessages ($ hasRestrictedVoiceAndVideoMessages )
661+ {
662+ $ this ->hasRestrictedVoiceAndVideoMessages = $ hasRestrictedVoiceAndVideoMessages ;
663+ }
443664}
0 commit comments