element-hq / element-integration-manager

Element Integration Manager related issues
6 stars 1 forks source link

Feeds sending empty events #92

Closed vranki closed 1 year ago

vranki commented 1 year ago

Describe the bug

Feeds sends events with no link or other content.

For example, in #demoscene-feeds:hacklab.fi we have feed "Mastodon demoscene" which follows a mastodon instance's #demoscene hashtag at RSS url https://fosstodon.org/tags/demoscene.rss

The (recent) feeds posts just say "New post in Mastodon demoscene" and there is no URL or any content. These used to contain a URL after the message before.

Example event source:

{
  "content": {
    "body": "New post in Mastodon demoscene",
    "external_url": "https://mas.to/@c64/110276129284740343",
    "format": "org.matrix.custom.html",
    "formatted_body": "New post in Mastodon demoscene",
    "msgtype": "m.notice",
    "uk.half-shot.matrix-hookshot.feeds.item": {
      "author": null,
      "feed": {
        "title": "#demoscene",
        "url": "https://fosstodon.org/tags/demoscene.rss"
      },
      "fetchKey": "0e773a6c-488e-4dcb-9760-02b9553dc588",
      "link": "https://mas.to/@c64/110276129284740343",
      "pubdate": "Fri, 28 Apr 2023 11:09:55 +0000",
      "summary": "<p>Digital News Preview by CRSD, released on January 31st, 1988. Check it out @ <a href=\"https://c64.ch/productions/9719/Digital_News_Preview\" rel=\"nofollow noopener noreferrer\" target=\"_blank\"><span class=\"invisible\">https://</span><span class=\"ellipsis\">c64.ch/productions/9719/Digita</span><span class=\"invisible\">l_News_Preview</span></a> <br>/ c64.ch -  <a href=\"https://mas.to/tags/c64\" class=\"mention hashtag\" rel=\"nofollow noopener noreferrer\" target=\"_blank\">#<span>c64</span></a> <a href=\"https://mas.t…",
      "title": null
    }
  },
  "origin_server_ts": 1682680339454,
  "sender": "@feeds:integrations.ems.host",
  "type": "m.room.message",
  "unsigned": {},
  "event_id": "$IrTq1JPsKRJsJugVwNfO3YPgr0A1y_KfsHEWXlge8EU",
  "room_id": "!dmLxyGhFhAWPHMcvyD:hacklab.fi"
}
Half-Shot commented 1 year ago

The lack of a title on the RSS feed is spooking it a bit, but we can do a bit better.

Half-Shot commented 1 year ago

Fixed in https://github.com/matrix-org/matrix-hookshot/pull/737, release will be due out soon enough.