Use original opengraph dependency (#17855)
The PR is now merged with the original repo, so we can remove the temporary replace. https://focalboard-community.octo.mattermost.com/workspace/zyoahc9uapdn3xdptac6jb69ic?id=285b80a3-257d-41f6-8cf4-ed80ca9d92e5&v=495cdb4d-c13a-4992-8eb9-80cfee2819a4&c=59af323d-35a7-4312-87a1-e374239a03d9 ```release-note NONE ```
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
98d170894d
Коммит
14acff5466
12
vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go
сгенерированный
поставляемый
12
vendor/github.com/dyatlov/go-opengraph/opengraph/opengraph.go
сгенерированный
поставляемый
@@ -17,7 +17,7 @@ type Image struct {
|
||||
Type string `json:"type"`
|
||||
Width uint64 `json:"width"`
|
||||
Height uint64 `json:"height"`
|
||||
draft bool `json:"-"`
|
||||
draft bool `json:"-"`
|
||||
}
|
||||
|
||||
// Video defines Open Graph Video type
|
||||
@@ -27,7 +27,7 @@ type Video struct {
|
||||
Type string `json:"type"`
|
||||
Width uint64 `json:"width"`
|
||||
Height uint64 `json:"height"`
|
||||
draft bool `json:"-"`
|
||||
draft bool `json:"-"`
|
||||
}
|
||||
|
||||
// Audio defines Open Graph Audio Type
|
||||
@@ -35,7 +35,7 @@ type Audio struct {
|
||||
URL string `json:"url"`
|
||||
SecureURL string `json:"secure_url"`
|
||||
Type string `json:"type"`
|
||||
draft bool `json:"-"`
|
||||
draft bool `json:"-"`
|
||||
}
|
||||
|
||||
// Article contain Open Graph Article structure
|
||||
@@ -182,7 +182,7 @@ func (og *OpenGraph) ProcessMeta(metaAttrs map[string]string) {
|
||||
case "og:locale:alternate":
|
||||
og.LocalesAlternate = append(og.LocalesAlternate, metaAttrs["content"])
|
||||
case "og:audio":
|
||||
if len(og.Audios) > 0 && og.Audios[len(og.Audios)-1].draft {
|
||||
if len(og.Audios)>0 && og.Audios[len(og.Audios)-1].draft {
|
||||
og.Audios[len(og.Audios)-1].URL = metaAttrs["content"]
|
||||
og.Audios[len(og.Audios)-1].draft = false
|
||||
} else {
|
||||
@@ -195,7 +195,7 @@ func (og *OpenGraph) ProcessMeta(metaAttrs map[string]string) {
|
||||
og.ensureHasAudio()
|
||||
og.Audios[len(og.Audios)-1].Type = metaAttrs["content"]
|
||||
case "og:image":
|
||||
if len(og.Images) > 0 && og.Images[len(og.Images)-1].draft {
|
||||
if len(og.Images)>0 && og.Images[len(og.Images)-1].draft {
|
||||
og.Images[len(og.Images)-1].URL = metaAttrs["content"]
|
||||
og.Images[len(og.Images)-1].draft = false
|
||||
} else {
|
||||
@@ -223,7 +223,7 @@ func (og *OpenGraph) ProcessMeta(metaAttrs map[string]string) {
|
||||
og.Images[len(og.Images)-1].Height = h
|
||||
}
|
||||
case "og:video":
|
||||
if len(og.Videos) > 0 && og.Videos[len(og.Videos)-1].draft {
|
||||
if len(og.Videos)>0 && og.Videos[len(og.Videos)-1].draft {
|
||||
og.Videos[len(og.Videos)-1].URL = metaAttrs["content"]
|
||||
og.Videos[len(og.Videos)-1].draft = false
|
||||
} else {
|
||||
|
||||
Ссылка в новой задаче
Block a user