Skip to content

Commit

Permalink
PHPDoc mislead to wrong getter getChat().
Browse files Browse the repository at this point in the history
Factory creates getter getSenderChat() because property name sender_chat in MessageOriginChat
  • Loading branch information
r3bers committed Jun 25, 2024
1 parent b9cd494 commit 7811587
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/DB.php
Original file line number Diff line number Diff line change
Expand Up @@ -1293,8 +1293,8 @@ public static function insertMessageRequest(Message $message): bool
} elseif ($forward_origin instanceof MessageOriginHiddenUser) {
$forward_sender_name = $forward_origin->getSenderUserName();
} elseif ($forward_origin instanceof MessageOriginChat) {
self::insertChat($forward_origin->getSender_chat());
$forward_from_chat = $forward_origin->getSender_chat()->getId();
self::insertChat($forward_origin->getSenderChat());
$forward_from_chat = $forward_origin->getSenderChat()->getId();
$forward_signature = $forward_origin->getAuthorSignature();
} elseif ($forward_origin instanceof MessageOriginChannel) {
self::insertChat($forward_origin->getChat());
Expand Down
2 changes: 1 addition & 1 deletion src/Entities/MessageOrigin/MessageOriginChat.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*
* @method string getType() Type of the message origin, always “chat”
* @method int getDate() Date the message was sent originally in Unix time
* @method Chat getSender_chat() Chat that sent the message originally
* @method Chat getSenderChat() Chat that sent the message originally
* @method string getAuthorSignature() Optional. For messages originally sent by an anonymous chat administrator, original message author signature
*/
class MessageOriginChat extends Entity implements MessageOrigin
Expand Down

0 comments on commit 7811587

Please sign in to comment.