Posting before rich-embed completed shows unwanted attachment in new comment underneath #2418

Summary

Closes #2418 (closed)

Original change on prod is that if you hit enter too quickly after posting a link, it will not post with the rich embed preview, but it will upload in a separate comment below after the comment is posted instead.

Behaviourally,

  • A user should be able to post a link without a rich embed
  • Once the user has posted, they should not see rich-embed in new window.

Steps to test

  1. Log in and go to a post
  2. Copy a link e.g. https://www.google.com/
  3. Paste it into a comment on the post and rapidly hit enter (do not wait for preview response)
  4. it should post without the preview, there should not be a new attachment that loads under the comment.
  5. Repeat with an invalid URL e.g. https://www.ks3fnj3n9.com
  6. Try typing a url
  7. Ensure when you wait for the rich-embed to come back, it does post.

Estimated Regression Scope

The area that this change impacts has been reduced; it should now, in the worst-case scenario mess something up only with rich-embeds.

Merge request reports

Loading