FIX: Load Oneboxes in encrypted posts

FIX: Load Oneboxes in encrypted posts

diff --git a/assets/javascripts/discourse/initializers/hook-decrypt-post.js.es6 b/assets/javascripts/discourse/initializers/hook-decrypt-post.js.es6
index 6995205..bd38981 100644
--- a/assets/javascripts/discourse/initializers/hook-decrypt-post.js.es6
+++ b/assets/javascripts/discourse/initializers/hook-decrypt-post.js.es6
@@ -13,6 +13,7 @@ import { cookAsync } from "discourse/lib/text";
 import { markdownNameFromFileName } from "discourse/lib/uploads";
 import { base64ToBuffer } from "discourse/plugins/discourse-encrypt/lib/base64";
 import lightbox from "discourse/lib/lightbox";
+import { loadOneboxes } from "discourse/lib/load-oneboxes";
 
 import {
   ENCRYPT_DISABLED,
@@ -282,6 +283,16 @@ function postProcessPost(siteSettings, topicId, $post) {
     }
   });
 
+  // Load Oneboxes
+  loadOneboxes(
+    $post[0],
+    ajax,
+    topicId,
+    null, // categoryId
+    siteSettings.max_oneboxes_per_post,
+    false
+  );
+
   const $elements = $("img[data-orig-src], a[data-orig-href]");
   if ($elements.length > 0) {
     debounce(this, lookupAndResolveShortUrlElement, urls, $elements, 450, true);

GitHub sha: 51ebfd57

This commit appears in #80 which was approved by eviltrout. It was merged by udan11.