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.
- package/library.js +2 -1
- 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,
|