Skip to content

Commit

Permalink
up last version of telegram api
Browse files Browse the repository at this point in the history
  • Loading branch information
madmages committed Aug 25, 2022
1 parent 15a29ed commit 9f976e0
Show file tree
Hide file tree
Showing 55 changed files with 2,517 additions and 427 deletions.
528 changes: 413 additions & 115 deletions src/Client.php

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion src/Type/Animation.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,9 @@ public function _getData(): array
protected $mimeType;

/**
* Optional. File size in bytes
* Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
* defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type
* are safe for storing this value.
*
* @var int|null
* @SkipWhenEmpty
Expand Down
4 changes: 3 additions & 1 deletion src/Type/Audio.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ public function _getData(): array
protected $mimeType;

/**
* Optional. File size in bytes
* Optional. File size in bytes. It can be bigger than 2^31 and some programming languages may have difficulty/silent
* defects in interpreting it. But it has at most 52 significant bits, so a signed 64-bit integer or double-precision float type
* are safe for storing this value.
*
* @var int|null
* @SkipWhenEmpty
Expand Down
3 changes: 2 additions & 1 deletion src/Type/CallbackQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public function _getData(): array
protected $chatInstance;

/**
* Optional. Data associated with the callback button. Be aware that a bad client can send arbitrary data in this field.
* Optional. Data associated with the callback button. Be aware that the message originated the query can contain no
* callback buttons with this data.
*
* @var string|null
* @SkipWhenEmpty
Expand Down
98 changes: 98 additions & 0 deletions src/Type/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ public static function _getPropertyNames(): array
'photo',
'bio',
'has_private_forwards',
'has_restricted_voice_and_video_messages',
'join_to_send_messages',
'join_by_request',
'description',
'invite_link',
'pinned_message',
Expand Down Expand Up @@ -68,6 +71,9 @@ public function _getData(): array
'photo' => $this->getPhoto(),
'bio' => $this->getBio(),
'has_private_forwards' => $this->getHasPrivateForwards(),
'has_restricted_voice_and_video_messages' => $this->getHasRestrictedVoiceAndVideoMessages(),
'join_to_send_messages' => $this->getJoinToSendMessages(),
'join_by_request' => $this->getJoinByRequest(),
'description' => $this->getDescription(),
'invite_link' => $this->getInviteLink(),
'pinned_message' => $this->getPinnedMessage(),
Expand Down Expand Up @@ -184,6 +190,41 @@ public function _getData(): array
*/
protected $hasPrivateForwards;

/**
* Optional. True, if the privacy settings of the other party restrict sending voice and video note messages in the
* private chat. Returned only in getChat.
*
* @var bool|null
* @SkipWhenEmpty
* @SerializedName("has_restricted_voice_and_video_messages")
* @Accessor(getter="getHasRestrictedVoiceAndVideoMessages",setter="setHasRestrictedVoiceAndVideoMessages")
* @Type("bool")
*/
protected $hasRestrictedVoiceAndVideoMessages;

/**
* Optional. True, if users need to join the supergroup before they can send messages. Returned only in getChat.
*
* @var bool|null
* @SkipWhenEmpty
* @SerializedName("join_to_send_messages")
* @Accessor(getter="getJoinToSendMessages",setter="setJoinToSendMessages")
* @Type("bool")
*/
protected $joinToSendMessages;

/**
* Optional. True, if all users directly joining the supergroup need to be approved by supergroup administrators.
* Returned only in getChat.
*
* @var bool|null
* @SkipWhenEmpty
* @SerializedName("join_by_request")
* @Accessor(getter="getJoinByRequest",setter="setJoinByRequest")
* @Type("bool")
*/
protected $joinByRequest;

/**
* Optional. Description, for groups, supergroups and channel chats. Returned only in getChat.
*
Expand Down Expand Up @@ -482,6 +523,63 @@ public function getHasPrivateForwards(): ?bool
return $this->hasPrivateForwards;
}

/**
* @param bool $hasRestrictedVoiceAndVideoMessages
* @return static
*/
public function setHasRestrictedVoiceAndVideoMessages(bool $hasRestrictedVoiceAndVideoMessages): self
{
$this->hasRestrictedVoiceAndVideoMessages = $hasRestrictedVoiceAndVideoMessages;

return $this;
}

/**
* @return bool|null
*/
public function getHasRestrictedVoiceAndVideoMessages(): ?bool
{
return $this->hasRestrictedVoiceAndVideoMessages;
}

/**
* @param bool $joinToSendMessages
* @return static
*/
public function setJoinToSendMessages(bool $joinToSendMessages): self
{
$this->joinToSendMessages = $joinToSendMessages;

return $this;
}

/**
* @return bool|null
*/
public function getJoinToSendMessages(): ?bool
{
return $this->joinToSendMessages;
}

/**
* @param bool $joinByRequest
* @return static
*/
public function setJoinByRequest(bool $joinByRequest): self
{
$this->joinByRequest = $joinByRequest;

return $this;
}

/**
* @return bool|null
*/
public function getJoinByRequest(): ?bool
{
return $this->joinByRequest;
}

/**
* @param string $description
* @return static
Expand Down
Loading

0 comments on commit 9f976e0

Please sign in to comment.