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

Add Discord integration #3055

Merged
merged 1 commit into from
Jan 12, 2025
Merged

Add Discord integration #3055

merged 1 commit into from
Jan 12, 2025

Conversation

captainark
Copy link
Contributor

Hi!

I've added a Discord Integration to Miniflux, which generated those kind of messages on new entries:
Screenshot 2025-01-03 at 22 32 05

This PR was hacked together from other integrations and trial and error. I'm more than open to feedback if anything needs cleaning up.

I believe this PR would close #1642 if merged.

Do you follow the guidelines?

@captainark captainark force-pushed the main branch 2 times, most recently from 8019ee9 to 4ebd7de Compare January 4, 2025 11:57
internal/integration/discord/discord.go Outdated Show resolved Hide resolved
internal/integration/discord/discord.go Outdated Show resolved Hide resolved
internal/integration/discord/discord.go Outdated Show resolved Hide resolved
@captainark captainark force-pushed the main branch 5 times, most recently from b530438 to c058f86 Compare January 5, 2025 09:38
internal/integration/discord/discord.go Outdated Show resolved Hide resolved
internal/integration/discord/discord.go Outdated Show resolved Hide resolved
internal/template/templates/views/integrations.html Outdated Show resolved Hide resolved
@fguillot
Copy link
Member

I'm getting a 400 response when doing a quick test.

After adding some debugging, Discord reply this response body: {"embeds": ["0"]}

And Miniflux sent this request body:

{
  "embeds": [
    {
      "title": "Feed update from Miniflux",
      "color": 5793266,
      "fields": [
        {
          "name": "Updated RSS feed",
          "value": "Le Monde.fr - Actualités et Infos en France et dans le monde"
        },
        {
          "name": "Link to article",
          "value": "[Incendies à Los Angeles : artistes et collectionneurs font l'inventaire des œuvres d'art carbonisées](https://www.lemonde.fr/culture/article/2025/01/12/incendies-a-los-angeles-artistes-et-collectionneurs-font-l-inventaire-des-uvres-carbonisees_6494694_3246.html)"
        },
        {
          "name": "Author",
          "inline": true
        },
        {
          "name": "Source website",
          "value": "https://www.lemonde.fr/",
          "inline": true
        }
      ]
    }
  ]
}

Looks like the value field must be present. The "authors" section should not be sent if the feed does not contains any author.

@captainark
Copy link
Contributor Author

I "fixed" the issue when the authors section isn't defined in the RSS feed.

Here's what it looks like with my latest commit:
Screenshot 2025-01-12 at 20 46 26

@fguillot fguillot merged commit 9b25ea4 into miniflux:main Jan 12, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Discord Integration
3 participants