diff options
author | Debanshu Kundu <debanshu.kundu@joshtechnologygroup.com> | 2017-02-07 20:56:14 +0530 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2017-02-07 07:26:14 -0800 |
commit | 5cc30fa06149e1291deed6f53de53ecf25600d2c (patch) | |
tree | 7cf3c50114242d129324f562cadd885cde5c4de1 /api | |
parent | 439d5b7ed7547ac05693b7524ddc464469301a87 (diff) | |
download | chat-5cc30fa06149e1291deed6f53de53ecf25600d2c.tar.gz chat-5cc30fa06149e1291deed6f53de53ecf25600d2c.tar.bz2 chat-5cc30fa06149e1291deed6f53de53ecf25600d2c.zip |
PLT-5379 Fix the error occuring while fetching OG metadata for links which don't exist. (#5308)
Diffstat (limited to 'api')
-rw-r--r-- | api/post.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go index 4d1425c18..d9531b09a 100644 --- a/api/post.go +++ b/api/post.go @@ -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) } |