mirror of
https://github.com/aljazceru/njump.git
synced 2025-12-19 07:14:24 +01:00
prevent telegram instant view when we could fit stuff in the big image card.
This commit is contained in:
@@ -87,7 +87,7 @@ func renderEvent(w http.ResponseWriter, r *http.Request) {
|
|||||||
if data.event.Kind == 30023 || // do it for longform articles
|
if data.event.Kind == 30023 || // do it for longform articles
|
||||||
(data.event.Kind == 1 && len(data.event.Content) > 650) || // or very long notes
|
(data.event.Kind == 1 && len(data.event.Content) > 650) || // or very long notes
|
||||||
// or shorter notes that should be using text-to-image stuff but are not because they have video or images
|
// or shorter notes that should be using text-to-image stuff but are not because they have video or images
|
||||||
(data.event.Kind == 1 && len(data.event.Content) > 133 && !useTextImage) {
|
(data.event.Kind == 1 && len(data.event.Content)-len(data.image) > 133 && !useTextImage) {
|
||||||
data.templateId = TelegramInstantView
|
data.templateId = TelegramInstantView
|
||||||
useTextImage = false
|
useTextImage = false
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user