diff --git a/mattermost.go b/mattermost.go index 50427450ab..c4c2ae5603 100644 --- a/mattermost.go +++ b/mattermost.go @@ -1499,6 +1499,11 @@ func getMockContext() *api.Context { c.IpAddress = "cmd_line" c.T = utils.TfuncWithFallback(model.DEFAULT_LOCALE) c.Locale = model.DEFAULT_LOCALE + + if *utils.Cfg.ServiceSettings.SiteURL != "" { + c.SetSiteURL(*utils.Cfg.ServiceSettings.SiteURL) + } + return c }