mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Respect invalidate_oneboxes option for inline oneboxes
This commit is contained in:
@@ -77,8 +77,8 @@ module PrettyText
|
||||
result
|
||||
end
|
||||
|
||||
def lookup_inline_onebox(url)
|
||||
InlineOneboxer.lookup(url)
|
||||
def lookup_inline_onebox(url, opts = {})
|
||||
InlineOneboxer.lookup(url, opts)
|
||||
end
|
||||
|
||||
def get_topic_info(topic_id)
|
||||
|
||||
@@ -49,8 +49,14 @@ function __getURL(url) {
|
||||
return url;
|
||||
}
|
||||
|
||||
function __lookupInlineOnebox(url) {
|
||||
return __helpers.lookup_inline_onebox(url);
|
||||
function __lookupInlineOnebox(url, invalidate = false) {
|
||||
const opts = {};
|
||||
|
||||
if (invalidate) {
|
||||
opts["invalidate"] = true;
|
||||
}
|
||||
|
||||
return __helpers.lookup_inline_onebox(url, opts);
|
||||
}
|
||||
|
||||
function __lookupImageUrls(urls) {
|
||||
|
||||
Reference in New Issue
Block a user