Skip to content

Commit

Permalink
fix: Fixing thumbnail url for description event
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Boutour <[email protected]>
  • Loading branch information
ViBiOh committed May 21, 2022
1 parent 8f87b02 commit 0a56662
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (a *App) discordHandle(ctx context.Context, webhook provider.Webhook, event
}

if a.thumbnailApp.HasThumbnail(ctx, event.Item, thumbnail.SmallSize) {
embed.Thumbnail = discord.NewImage(url + "?thumbnail")
embed.Thumbnail = discord.NewImage(event.GetURL() + "?thumbnail&scale=large")
}

return send(ctx, webhook.ID, request.Post(webhook.URL), discord.NewDataResponse("").AddEmbed(embed))
Expand Down Expand Up @@ -155,7 +155,7 @@ func (a *App) slackHandle(ctx context.Context, webhook provider.Webhook, event p
}

if a.thumbnailApp.CanHaveThumbnail(event.Item) {
section.Accessory = slack.NewAccessory(url+"?thumbnail", fmt.Sprintf("Thumbnail of %s", event.Item.Name))
section.Accessory = slack.NewAccessory(event.GetURL()+"?thumbnail", fmt.Sprintf("Thumbnail of %s", event.Item.Name))
}

return send(ctx, webhook.ID, request.Post(webhook.URL), slack.NewResponse(a.eventText(event)).AddBlock(slack.NewSection(slack.NewText(fmt.Sprintf("*<%s|%s>*", url, title)))).AddBlock(section))
Expand Down

0 comments on commit 0a56662

Please sign in to comment.