nodebb-plugin-link-preview 2.0.6 → 2.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/library.js CHANGED
@@ -70,12 +70,12 @@ async function preview(url) {
70
70
  return false;
71
71
  },
72
72
  }).then((preview) => {
73
- winston.verbose(`[link-preview] ${preview.url} (${preview.contentType}, cache: miss)`);
73
+ // winston.verbose(`[link-preview] ${preview.url} (${preview.contentType}, cache: miss)`);
74
74
  cache.set(`link-preview:${url}`, preview);
75
75
 
76
76
  return preview;
77
77
  }).catch(() => {
78
- winston.verbose(`[link-preview] ${url} (invalid, cache: miss)`);
78
+ // winston.verbose(`[link-preview] ${url} (invalid, cache: miss)`);
79
79
  cache.set(`link-preview:${url}`, { url });
80
80
  });
81
81
  }
@@ -118,6 +118,7 @@ async function process(content, { type, pid, tid, attachments }) {
118
118
  if (processInline) {
119
119
  const special = await handleSpecialEmbed(url, $anchor);
120
120
  if (special) {
121
+ requests.delete(url);
121
122
  continue;
122
123
  }
123
124
  }
@@ -223,7 +224,7 @@ async function render(preview) {
223
224
  const { app } = require.main.require('./src/webserver');
224
225
  const { embedHtml, embedImage, embedAudio, embedVideo } = await meta.settings.get('link-preview');
225
226
 
226
- winston.verbose(`[link-preview] ${preview.url} (${preview.contentType || 'invalid'}, cache: hit)`);
227
+ // winston.verbose(`[link-preview] ${preview.url} (${preview.contentType || 'invalid'}, cache: hit)`);
227
228
 
228
229
  if (!preview.contentType) {
229
230
  return false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {