This commit is contained in:
f4ilji
2024-11-13 13:38:58 +05:00
parent 462680ba77
commit f091b29b63
22 changed files with 488 additions and 418 deletions
+2 -14
View File
@@ -46,7 +46,7 @@ class VkWallService
public function createPost(string $message, int $from_group, string $attachments = '', int $publish_date)
public function createPost(string $message, int $from_group, string $attachments = '', int|null $publish_date = null)
{
$params = [
'owner_id' => '-' . $this->publicId,
@@ -79,7 +79,7 @@ class VkWallService
}
}
public function updatePost(int $post_id, string $message = '', int $from_group = 1, string $attachments = '', int $publish_date)
public function updatePost(int $post_id, string $message = '', int $from_group = 1, string $attachments = '', int|null $publish_date = null)
{
if (empty($message) && empty($attachments)) {
return [
@@ -89,18 +89,6 @@ class VkWallService
}
$params = [
'owner_id' => '-' . $this->publicId,
'post_id' => $post_id,
'message' => $message,
'attachments' => $attachments,
'access_token' => $this->wallToken,
'v' => '5.131',
];
try {
return $this->vk->wall()->edit(
$this->vkAuthService->getToken()->access_token,