matrix-org / go-neb

Extensible matrix bot written in Go
Apache License 2.0
282 stars 91 forks source link

RSS: trac.torproject.org feeds don't have clickable links in Riot #284

Open Mikaela opened 5 years ago

Mikaela commented 5 years ago

There is just nothing to click at Riot.

Screenshot from 2019-05-09 00-37-40

{
  "content": {
    "body": "Tor Bug Tracker & Wiki: Ticket #23888: Creating a Snowflake WebExtension addon:  (https://trac.torproject.org/projects/tor/ticket/23888#comment:19)",
    "format": "org.matrix.custom.html",
    "formatted_body": "<strong>Tor Bug Tracker &amp; Wiki: Ticket #23888: Creating a Snowflake WebExtension addon</strong>:<br><a href=\"https://trac.torproject.org/projects/tor/ticket/23888#comment:19\"><strong></strong></a>",
    "msgtype": "m.notice"
  },
  "event_id": "$15573503543595335xtwTH:matrix.org",
  "origin_server_ts": 1557350354688,
  "sender": "@_neb_rssbot_=40mikaela=3aprivacytools.io:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 921292
  },
  "room_id": "!zBMUYyApaSEJLVWozj:matrix.org"
}

How IRC (or Fruitiex/TeleIRC sees it):

<RSSBot[mikaelapr> Tor Bug Tracker &amp; Wiki: Ticket #23888: Creating a Snowflake WebExtension addon: (https://trac.torproject.org/projects/tor/ticket/23888#comment:19)

Mikaela commented 5 years ago

Another entry from that feed got a link, but it wasn't the full line as usually.

Screenshot from 2019-05-09 00-45-26

{
  "content": {
    "body": "Tor Bug Tracker &amp; Wiki: Ticket #23888: Creating a Snowflake WebExtension addon: cc changed (https://trac.torproject.org/projects/tor/ticket/23888#comment:20)",
    "format": "org.matrix.custom.html",
    "formatted_body": "<strong>Tor Bug Tracker &amp; Wiki: Ticket #23888: Creating a Snowflake WebExtension addon</strong>:<br><a href=\"https://trac.torproject.org/projects/tor/ticket/23888#comment:20\"><strong>cc changed</strong></a>",
    "msgtype": "m.notice"
  },
  "event_id": "$15573518543609937nHQNp:matrix.org",
  "origin_server_ts": 1557351854355,
  "sender": "@_neb_rssbot_=40mikaela=3aprivacytools.io:matrix.org",
  "type": "m.room.message",
  "unsigned": {
    "age": 21213
  },
  "room_id": "!zBMUYyApaSEJLVWozj:matrix.org"
}
anoadragon453 commented 5 years ago

Possibly related: https://github.com/matrix-org/go-neb/pull/269

anoadragon453 commented 5 years ago

So this is due to item.Title being an empty string, and thus there being a link, but no link text to display.