Skip to content

Commit

Permalink
Update BlueskyClient.php
Browse files Browse the repository at this point in the history
  • Loading branch information
kawax committed Sep 2, 2024
1 parent f898543 commit 98af22c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/BlueskyClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,11 @@ public function post(string $text, ?array $facets = null, ?array $embed = null):
{
$record = collect([
'text' => $text,
'facets' => $facets,
'embed' => $embed,
'createdAt' => now()->toISOString(),
])->when(filled($facets),
fn (Collection $collection) => $collection->put('facets', $facets),
)->when(filled($embed),
fn (Collection $collection) => $collection->put('embed', $embed),
)->toArray();
])->reject(fn ($item) => is_null($item))
->toArray();

return Http::baseUrl($this->baseUrl())
->withToken($this->session('accessJwt'))
Expand Down

0 comments on commit 98af22c

Please sign in to comment.