mirror of
https://github.com/philomena-dev/philomena.git
synced 2025-02-13 09:24:22 +01:00
Merge pull request #413 from mdashlw/bluesky-update
Handle bluesky's recordWithMedia
This commit is contained in:
commit
02aed2c7e6
1 changed files with 3 additions and 1 deletions
|
@ -31,13 +31,15 @@ defmodule PhilomenaProxy.Scrapers.Bluesky do
|
|||
|> Map.fetch!("posts")
|
||||
|> hd()
|
||||
|
||||
images = post_json["embed"]["images"] || post_json["embed"]["media"]["images"] || []
|
||||
|
||||
%{
|
||||
source_url: url,
|
||||
author_name: domain_first_component(post_json["author"]["handle"]),
|
||||
description: post_json["record"]["text"],
|
||||
images:
|
||||
Enum.map(
|
||||
post_json["embed"]["images"],
|
||||
images,
|
||||
&%{
|
||||
url: String.replace(&1["fullsize"], @fullsize_image_regex, @blob_image_url_pattern),
|
||||
camo_url: PhilomenaProxy.Camo.image_url(&1["thumb"])
|
||||
|
|
Loading…
Reference in a new issue