Discobot broken when I send it a.com, example.com in its tutorial?

The links I sent are a.com, example.com, https://example.com and https://en.wikipedia.org/wiki/Exotic_Shorthair. discobot stops replying and only sends a “checking on you” message a few minutes later (not in screenshot).

(Click on the screenshot to view whole dialogue. Can’t reprorduce on try.discourse.org because it doesn’t have discobot greeting)

לייק 1

Seems like a legit bug. From what I can see in the code, the onebox tutorial actually only accepts these 3 specific links, so its instructions are plain wrong. The code even mentions something about it:

https://github.com/discourse/discourse/blob/b828735c770e5054d54f6e4d3dbf38b322c3cc84/plugins/discourse-narrative-bot/lib/discourse_narrative_bot/new_user_narrative.rb#L270-L276

      # NOTE: This can be a bit brittle if people change the site text for
      # discourse_narrative_bot.new_user_narrative.onebox.instructions, or if
      # the user drops some other random link, but we accept that risk for now.
      found_link =
        @post.raw.match(
          %r{https://en\.wikipedia\.org/wiki/(Inherently_funny_word|Death_by_coconut|Calculator_spelling)},
        )

Now I know we’re not really investing more in the Discobot tutorial, but this is still iffy. What should we do @martin ? Could we at least add the Exotic_Shorthair link to the regex so at least the fallback works again?

(Moving this to bug regardless though.)

Crossposting this too Discobot Links are confusing in some translations

לייק 1

Yeah this is the fix, you can just add |Exotic_Shorthair to that post.raw.match regex

לייק 1

Done in

2 לייקים