REFACTOR: Remove constants from `text` helper

This commit is contained in:
Robin Ward 2020-08-19 12:25:13 -04:00
parent 4063cab8c2
commit df8ae6891c
1 changed files with 6 additions and 7 deletions

View File

@ -11,16 +11,15 @@ import { helperContext } from "discourse-common/lib/helpers";
import Session from "discourse/models/session";
function getOpts(opts) {
const siteSettings = Discourse.__container__.lookup("site-settings:main"),
site = Discourse.__container__.lookup("site:main");
let context = helperContext();
opts = _.merge(
opts = Object.assign(
{
getURL: getURLWithCDN,
currentUser: Discourse.__container__.lookup("current-user:main"),
censoredRegexp: site.censored_regexp,
customEmojiTranslation: site.custom_emoji_translation,
siteSettings,
currentUser: context.currentUser,
censoredRegexp: context.site.censored_regexp,
customEmojiTranslation: context.site.custom_emoji_translation,
siteSettings: context.siteSettings,
formatUsername
},
opts