Skip to content

Link/Image previews for tags #616

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Nov 16, 2022
Merged

Link/Image previews for tags #616

merged 10 commits into from
Nov 16, 2022

Conversation

Zabuzard
Copy link
Member

@Zabuzard Zabuzard commented Oct 7, 2022

Overview

Fixes #270 by implementing automatic link and image previews to the /tag command.

Image only preview:
example

Link preview:
link

Utility

This feature is also available as general purpose utility via the LinkPreviews class, yielding records LinkPreview.

The utility offers two methods:

  • static List<String> extractLinks(String content)
  • static CompletableFuture<List<LinkPreview>> createLinkPreviews(List<String> links)

Features like #637 will likely make use of this as well.

Dependencies

Adds io.github.url-detector:url-detector:0.1.23 to the deps. URL regex is not something we want to have in our own code base lol.

Also adds JSoup for the OpenGraph/Twitter meta-extraction.

Checklist

  • draft
  • opengraph extraction
  • add warn logs to all failures
  • polish
  • javadoc
  • possibly unit tests (not today)

@Zabuzard Zabuzard added enhance command Modify or improve an existing command or group of commands of the bot priority: major labels Oct 7, 2022
@Zabuzard Zabuzard self-assigned this Oct 7, 2022
@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard Zabuzard force-pushed the feature/tag_link_preview branch from 0072c45 to 5b5e75b Compare October 8, 2022 20:16
@github-actions
Copy link

github-actions bot commented Nov 8, 2022

This pull request is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

@github-actions github-actions bot added the stale label Nov 8, 2022
@Zabuzard
Copy link
Member Author

Zabuzard commented Nov 8, 2022

This pull request is stale because it has been open 30 days with no activity. Remove stale label, comment or add the valid label or this will be closed in 5 days.

yikes. ill have a look again 😬

@Zabuzard Zabuzard removed the stale label Nov 8, 2022
@Zabuzard Zabuzard force-pushed the feature/tag_link_preview branch from 5b5e75b to 17ffde3 Compare November 8, 2022 08:50
@Zabuzard Zabuzard marked this pull request as ready for review November 11, 2022 10:52
@Zabuzard Zabuzard requested review from a team as code owners November 11, 2022 10:52
@Zabuzard Zabuzard force-pushed the feature/tag_link_preview branch from 707a9fd to 9ba00ea Compare November 11, 2022 10:53
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Zabuzard
Copy link
Member Author

8 days since last change, merging

@Zabuzard Zabuzard merged commit b7e2910 into develop Nov 16, 2022
@Zabuzard Zabuzard deleted the feature/tag_link_preview branch November 16, 2022 09:11
@Zabuzard Zabuzard mentioned this pull request Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhance command Modify or improve an existing command or group of commands of the bot priority: major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tags dont display image and link previews
1 participant