Skip to content

Commit

Permalink
createChatInvitelink returns array and solves the create link issue (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
arifjawad committed Jul 21, 2022
1 parent 72ab9ed commit 15d2c57
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Methods/Chat.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Telegram\Bot\Objects\Chat as ChatObject;
use Telegram\Bot\Objects\ChatMember;
use Telegram\Bot\Traits\Http;
use Telegram\Bot\Objects\ChatInviteLink;

/**
* Class Chat.
Expand Down Expand Up @@ -133,7 +134,7 @@ public function exportChatInviteLink(array $params): string
*/
public function createChatInviteLink(array $params): ChatInviteLink
{
return $this->post('createChatInviteLink', $params)->getResult();
return new ChatInviteLink($this->post('createChatInviteLink', $params)->getDecodedBody());
}

/**
Expand Down

0 comments on commit 15d2c57

Please sign in to comment.