mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-5379 Fix the error occuring while fetching OG metadata for links which don't exist. (#5308)
This commit is contained in:
@@ -444,6 +444,7 @@ func getOpenGraphMetadata(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
ogJson, err := og.ToJSON()
|
||||
if err != nil {
|
||||
w.Write([]byte(`{"url": ""}`))
|
||||
return
|
||||
}
|
||||
w.Write(ogJson)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user