Changes
This commit is contained in:
@@ -28,7 +28,7 @@ class VkService
|
||||
return $this->wallService->getPostById($id);
|
||||
}
|
||||
|
||||
public function createPost(string $title, string $message, array $images = [], int $publish_date = null)
|
||||
public function createPost(string $title, string $message, array $images = [], int|null $publish_date = null)
|
||||
{
|
||||
$from_group = 1;
|
||||
$album_attachment = '';
|
||||
@@ -40,7 +40,7 @@ class VkService
|
||||
return $this->wallService->createPost($message, $from_group, $album_attachment, $publish_date);
|
||||
}
|
||||
|
||||
public function updatePost(int $id, string $title, string $message, array $images = [], int $publish_date = null)
|
||||
public function updatePost(int $id, string $title, string $message, array $images = [], int|null $publish_date = null)
|
||||
{
|
||||
$from_group = 1;
|
||||
$vk_post = $this->wallService->getPostById($id);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user