Skip to content

Commit

Permalink
Fix: ads
Browse files Browse the repository at this point in the history
  • Loading branch information
xtrime-ru committed Dec 18, 2024
1 parent e387135 commit 9f3de19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Wrappers/Ads.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function getSponsoredMessages(int|string|array $peer): ?array
if ($cache && $cache[0] > time()) {
return $cache[1];
}
$result = $this->methodCallAsyncRead('channels.getSponsoredMessages', ['channel' => $peer]);
$result = $this->methodCallAsyncRead('messages.getSponsoredMessages', ['peer' => $peer]);
if (\array_key_exists('messages', $result)) {
$result = $result['messages'];
} else {
Expand All @@ -67,6 +67,6 @@ public function viewSponsoredMessage(int|array $peer, string|array $message): bo
if (\is_array($message)) {
$message = $message['random_id'];
}
return $this->methodCallAsyncRead('channels.viewSponsoredMessage', ['channel' => $peer, 'random_id' => $message]);
return $this->methodCallAsyncRead('messages.viewSponsoredMessage', ['peer' => $peer, 'random_id' => $message]);
}
}

0 comments on commit 9f3de19

Please sign in to comment.