-
Notifications
You must be signed in to change notification settings - Fork 0
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
Conversation
Bundle ReportChanges will increase total bundle size by 1.47kB (0.28%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAttention: Patch coverage is
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. |
src/Event/LinkSharedEvent.php
Outdated
{ | ||
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/')) { |
There was a problem hiding this comment.
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?
src/Event/LinkSharedEvent.php
Outdated
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']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Message might be empty
From:

To:

Todos: