nodebb-plugin-link-preview 2.0.0 → 2.0.2

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.
Files changed (2) hide show
  1. package/library.js +2 -1
  2. package/package.json +1 -1
package/library.js CHANGED
@@ -146,7 +146,7 @@ async function process(content, opts) {
146
146
  }
147
147
 
148
148
  case 'attachment': {
149
- attachmentHtml += `<div class="col-6">${html}</div>`;
149
+ attachmentHtml += `<div class="col-lg-6">${html}</div>`;
150
150
  break;
151
151
  }
152
152
  }
@@ -308,6 +308,7 @@ plugin.onPost = async ({ post }) => {
308
308
  const urls = lines.filter(line => isURL(line));
309
309
 
310
310
  let previews = await Promise.all(urls.map(async url => await preview(url)));
311
+ previews = previews.filter(Boolean);
311
312
  previews = previews.map(({ url, contentType: mediaType }) => ({
312
313
  type: 'inline',
313
314
  url,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodebb-plugin-link-preview",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "description": "A starter kit for quickly creating NodeBB plugins",
5
5
  "main": "library.js",
6
6
  "repository": {