discourse/app/assets/javascripts/pretty-text
Bianca Nenciu ecc3c404a0
FIX: Cache missing inline oneboxes (#12953)
* FIX: Cache missing inline oneboxes

Some inline oneboxes were not cached when the server did not return an
answer for an URL and the queried URL and the absolute URL were
different.

For example, if user typed www.example.com, the client asked the server
for http://www.example.com and if the server returned an empty response,
then the client would keep requesting an inline onebox everytime the
composer changed.

In other words, the key used for reading (the absolute URL) and the one
used for writing (the URL as typed by the user) were not the same when
the server returned an empty response.

* DEV: Check cache before making request

There is another cache check in PrettyText, but that is not enough if
multiple requests are pending. This problem was made obvious in tests,
but can happen for users with slow connections.
2021-05-06 19:08:04 +03:00
..
addon FIX: Cache missing inline oneboxes (#12953) 2021-05-06 19:08:04 +03:00
app DEV: Move pretty-text into an ember-addon format (#9689) 2020-05-07 12:37:47 -04:00
config DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
engines/discourse-markdown DEV: tiny refactor in watched words (#12969) 2021-05-06 11:37:05 -04:00
vendor DEV: Ember Addon needs a vendor dir 2020-05-07 15:45:35 -04:00
ember-cli-build.js DEV: apply new coding standards (#10592) 2020-09-04 13:42:47 +02:00
index.js REFACTOR: Support bundling our admin section as an ember addon 2020-09-22 15:14:29 -04:00
package.json DEV: Migrate to Ember CLI (#11932) 2021-02-03 14:22:20 -05:00
yarn.lock Build(deps): Bump lodash in /app/assets/javascripts/pretty-text 2020-09-08 10:25:45 -04:00