A bug has been reported in the Discobot image lesson, where it incorrectly responds with “Looks like you didn’t upload an image” when a user replies with an image but doesn’t like the original post. anon80167013 initially reported the issue, which was later reproducible by jomaxro. The error occurs when a user drags and drops the image from Discobot’s post instead of uploading from their desktop. jomaxro was able to reproduce the issue again, and codinghorror clarified that dragging and dropping from the post is not a supported behavior.
Further investigation revealed that the issue is due to the image being converted into a onebox, which is not counted as an image by the post analyzer. tgxworld suggested a solution to make the rules more lax for Discobot, considering any image tag in the cooked post as a valid image. The issue has been fixed in a commit to the Discourse GitHub repository, thanks to the reporting and debugging efforts of anon80167013 and jomaxro.
The image lesson is the first lesson that asks you to do two things:
like the image Discobot sends you
reply with an image
If you just reply with an image, Discobot says:
Looks like you didn’t upload an image
even though the image is fine, and it’s just that you need to like the message. Probably it should either not require you to do two things in response to one message, or be clearer that you have to like it, or just actually tell you that you need to like it if you reply without having done so.
(Someone else already reported this here, but apparently it’s not reproducible – initially, I dragged the image Discobot sends you into the reply box; once I failed it once, I copied the link Discobot sends you, and both times I just got “Looks like you didn’t upload an image”, not anything about needing to like the message.)
Yep, can repro. If you upload an image but don’t like the post, you get the “no image found” error, instead of the expected “why didn’t you like my post?”
Repro’d it again. What I did was dragged and dropped the picture of the unicorn from discobot’s post, which caused the “you didn’t upload a picture” error.
I can confirm that uploading an image from local (I tested via drag and drop) works as expected, and I see the “did you forget to my post” reply.
Ahh I see what the problem is here. When a link to an image is given, it gets converted into a onebox. Any images that are present within a onebox are not counted as an image as far as our post analyzer is concerned. I guess we can be more lax with the rules for discobot such that any image tag in the cooked post is considered to be a valid image?