Skip to content
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

Unfurling Discord Message Links #221

Merged
merged 8 commits into from
Dec 13, 2024
Merged

Unfurling Discord Message Links #221

merged 8 commits into from
Dec 13, 2024

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Nov 27, 2024

From:
image

To:
image

Todos:

  • Copy Discrod Bot Token to prod env

@HazAT HazAT requested a review from a team as a code owner November 27, 2024 18:56
Copy link

codecov bot commented Nov 27, 2024

Bundle Report

Changes will increase total bundle size by 1.47kB (0.28%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
gib-potato-esm 524.82kB 1.47kB (0.28%) ⬆️

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 17.77778% with 74 lines in your changes missing coverage. Please review.

Project coverage is 24.80%. Comparing base (5aa52c2) to head (153de2e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/Event/LinkSharedEvent.php 0.00% 39 Missing ⚠️
src/Http/SlackClient.php 0.00% 18 Missing ⚠️
src/Http/DiscordClient.php 39.13% 14 Missing ⚠️
src/Event/EventFactory.php 66.66% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main     #221      +/-   ##
============================================
- Coverage     25.65%   24.80%   -0.86%     
- Complexity      311      315       +4     
============================================
  Files            74       77       +3     
  Lines          3297     3435     +138     
============================================
+ Hits            846      852       +6     
- Misses         2451     2583     +132     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

{
foreach ($this->links as $link) {
// if Discord link, unfurl and fetch the message and return it
if (str_starts_with($link['url'], 'https://discord.com/')) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HazAT As Slack only emits events for configured domains, do we need this check?

foreach ($this->links as $link) {
// if Discord link, unfurl and fetch the message and return it
if (str_starts_with($link['url'], 'https://discord.com/')) {
$message = $this->fetchDiscordMessage($link['url']);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Message might be empty

@cleptric cleptric merged commit cb78a23 into main Dec 13, 2024
8 of 10 checks passed
@cleptric cleptric deleted the gibunfurl branch December 13, 2024 14:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants