튜토리얼에 있는 .com, example.com을 보냈더니 디스코봇이 고장 났어요?

제가 보낸 링크는 a.com, example.com, https://example.comhttps://en.wikipedia.org/wiki/Exotic_Shorthair입니다. discobot이 답변을 멈추고 몇 분 후 "확인 중"이라는 메시지만 전송합니다(스크린샷에 포함되지 않음).

(스크린샷을 클릭하면 전체 대화를 볼 수 있습니다. try.discourse.org에서는 discobot의 인사 기능이 없어 재현할 수 없습니다.)

1개의 좋아요

진짜 버그인 것 같습니다. 코드에서 볼 수 있듯이, 원박스(Onebox) 튜토리얼은 실제로 이 세 개의 특정 링크만 허용하므로, 해당 지침은 명백하게 잘못되었습니다. 코드에도 이에 대한 언급이 있습니다:

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)},
        )

디스코봇(Discobot) 튜토리얼에 더 이상 투자하지 않는다는 점은 알고 있지만, 그래도 이건 좀 문제가 있습니다. @martin, 어떻게 해야 할까요? 적어도 Exotic_Shorthair 링크를 정규식(regex)에 추가해서 폴백(fallback)이 다시 작동하도록 할 수는 없을까요?

(어쨌든 이건 버그로 이동하겠습니다.)

이것도 크로스포스팅합니다: Discobot Links are confusing in some translations

1개의 좋아요

네, 이게 수정 방법입니다. 해당 post.raw.match 정규식에 |Exotic_Shorthair를 추가하면 됩니다.

1개의 좋아요

완료되었습니다

2개의 좋아요