From 77a1dc1f2f12198881c00356a04dddef126b985d Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 22 Nov 2017 09:15:03 -0600 Subject: HTTP client refactor (#7884) * http client refactor * simplification --- api4/openGraph.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'api4/openGraph.go') diff --git a/api4/openGraph.go b/api4/openGraph.go index 6ddd0d79c..c552b54d9 100644 --- a/api4/openGraph.go +++ b/api4/openGraph.go @@ -7,7 +7,6 @@ import ( "net/http" l4g "github.com/alecthomas/log4go" - "github.com/mattermost/mattermost-server/app" "github.com/mattermost/mattermost-server/model" "github.com/mattermost/mattermost-server/utils" ) @@ -43,7 +42,7 @@ func getOpenGraphMetadata(c *Context, w http.ResponseWriter, r *http.Request) { return } - og := app.GetOpenGraphMetadata(url) + og := c.App.GetOpenGraphMetadata(url) ogJSON, err := og.ToJSON() openGraphDataCache.AddWithExpiresInSecs(props["url"], ogJSON, 3600) // Cache would expire after 1 hour -- cgit v1.2.3-1-g7c22