"review media unless trust level" setting causes reviews with emojis

It’s a little odd that we do this, and in the client we detect the “images” by querying the preview, which is also not ideal.

https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/controllers/composer.js#L1008-L1018

There’s room for a large refactor here, but in the meantime, we can just exclude emojis and avatars from sending their imageSizes to the payload. I checked and image sizes are not used at all for emojis and avatars, so it seems safe to do this: FIX: Don't send image sizes for emojis/avatars by pmusaraj · Pull Request #20589 · discourse/discourse · GitHub

As noted in the PR description, onebox images will also send the post to the review queue, but when this setting is enabled, that seems like a desirable side effect to me.

3 Likes