always use text-image on twitter.

nostr:note1j8kk28f6czmgfr2cxw4xrup2dl9ewxhwwqgw04k7wrg4psxa9tkq4h0emk
This commit is contained in:
fiatjaf
2023-11-11 22:02:14 -03:00
parent 464f043d63
commit 2350aa05a1

View File

@@ -96,8 +96,16 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
}
}
useTextImage := (data.event.Kind == 1 || data.event.Kind == 30023) &&
data.image == "" && data.video == "" && len(data.event.Content) > 133
useTextImage := false
if data.event.Kind == 1 || data.event.Kind == 30023 {
if data.image == "" && data.video == "" && len(data.event.Content) > 133 {
useTextImage = true
}
if style == StyleTwitter {
useTextImage = true
}
}
if tgiv := r.URL.Query().Get("tgiv"); tgiv == "true" || (style == StyleTelegram && tgiv != "false") {
// do telegram instant preview (only works on telegram mobile apps, not desktop)