martin
(Martin Brennan)
25.Февраль.2025 03:09:46
19
Я уже применил исправление для этого:
main ← fix/oneboxer-cache-discobot
merged 02:41AM - 25 Feb 25 UTC
This issue was found via Discobot. In part of the tutorial
for Discobot, it ask… s for a URL on one line so it can demonstrate
how oneboxes work.
The way it does this when the user replies is to cook the
post raw and check if there is a cached onebox for the URL
in the post. However, if you reply really fast to Discobot
with the URL without waiting for the onebox to appear in the
composer preview, it's not cached by the time we do this
check in the Discobot code.
This commit fixes the issue by following a more simplified
approach, where we check for the existence of one of the
following links from the onebox instructions:
```
https://en.wikipedia.org/wiki/Inherently_funny_word
https://en.wikipedia.org/wiki/Death_by_coconut
https://en.wikipedia.org/wiki/Calculator_spelling
```

This will fall down if someone customizes the onebox
step text, or if the user uses a different link instead,
but we are willing to accept that risk at this time to simplify things.
Проблема возникала при ответе со ссылкой до того, как предпросмотр в редакторе успевал преобразовать её в карточку. Теперь на этом этапе мы выполняем гораздо более простую проверку примеров ссылок.
3 лайка