Skip to content

Commit

Permalink
Clean
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrkhalil committed Aug 1, 2023
1 parent 70273a7 commit 35aa9ca
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions protocol/linkpreview/linkpreview.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ func (u OEmbedUnfurler) newOEmbedURL() (*neturl.URL, error) {
}

func handlePhotoOembedType(preview common.LinkPreview, response OEmbedBaseResponse) (common.LinkPreview, error) {

if response.URL != "" {
preview.Thumbnail.URL = response.URL
}
Expand Down Expand Up @@ -225,11 +224,11 @@ func (u OEmbedUnfurler) unfurl() (common.LinkPreview, error) {
}

err = json.Unmarshal(oembedBytes, &oembedResponse)

if oembedResponse.Title != "" {
preview.Title = oembedResponse.Title
}
switch oembedResponse.Type {

case "photo":
return handlePhotoOembedType(preview, oembedResponse)

Expand Down

0 comments on commit 35aa9ca

Please sign in to comment.