about summary refs log tree commit diff
path: root/src/lib/api
diff options
context:
space:
mode:
authorMarkus Amalthea Magnuson <markus@polyscopic.works>2023-06-12 01:40:59 +0200
committerMarkus Amalthea Magnuson <markus@polyscopic.works>2023-06-12 01:40:59 +0200
commit8f74c7b94980192c588ad7c67669d74d97bc43a1 (patch)
tree84eb1a7dc391057971ed44182680d49bec7162e7 /src/lib/api
parent8d03ab9399071a6979d17829bfc851b5e7fa1617 (diff)
downloadvoidsky-8f74c7b94980192c588ad7c67669d74d97bc43a1.tar.zst
Fix image-only posts not being visible in custom feeds.
Diffstat (limited to 'src/lib/api')
-rw-r--r--src/lib/api/feed-manip.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/api/feed-manip.ts b/src/lib/api/feed-manip.ts
index f2500c4f7..3ff156dd6 100644
--- a/src/lib/api/feed-manip.ts
+++ b/src/lib/api/feed-manip.ts
@@ -213,6 +213,12 @@ export class FeedTuner {
             hasProp(item.post.record, 'text') &&
             typeof item.post.record.text === 'string'
           ) {
+            // Treat empty text the same as no text.
+            if (item.post.record.text.length === 0) {
+              hasPreferredLang = true
+              break
+            }
+
             const res = lande(item.post.record.text)
 
             if (langsCode3.includes(res[0][0])) {