MM-13664 Cache external link metadata when populating post metadata (#10128)
* MM-13664 Added LinkMetadata types * MM-13664 Use LinkMetadata when populating post metadata * Fix unused import * Fix index name on SQLite * Finish adding unit tests * Address feedback * Increase max length of URL column to 2048 characters
Этот коммит содержится в:
коммит произвёл
Carlos Tadeu Panato Junior
родитель
5c76e90a83
Коммит
26684716aa
@@ -97,7 +97,7 @@ func createEphemeralPost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
rp := c.App.SendEphemeralPost(ephRequest.UserID, c.App.PostWithProxyRemovedFromImageURLs(ephRequest.Post))
|
||||
|
||||
w.WriteHeader(http.StatusCreated)
|
||||
w.Write([]byte(c.App.PreparePostForClient(rp).ToJson()))
|
||||
w.Write([]byte(c.App.PreparePostForClient(rp, true).ToJson()))
|
||||
}
|
||||
|
||||
func getPostsForChannel(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
@@ -259,7 +259,7 @@ func getPost(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
}
|
||||
|
||||
post = c.App.PreparePostForClient(post)
|
||||
post = c.App.PreparePostForClient(post, false)
|
||||
|
||||
if c.HandleEtag(post.Etag(), "Get Post", w, r) {
|
||||
return
|
||||
|
||||
Ссылка в новой задаче
Block a user