Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posts containing only an image do not show in custom feeds #787

Closed
strideynet opened this issue May 25, 2023 · 2 comments
Closed

Posts containing only an image do not show in custom feeds #787

strideynet opened this issue May 25, 2023 · 2 comments
Labels
bug Something isn't working x:on-the-roadmap We're planning to do this but it may be a bit

Comments

@strideynet
Copy link

strideynet commented May 25, 2023

Expected behaviour

A post containing an image but no text (e.g someone posting a meme) should show up on custom feeds (previously on "goodstuff") when a user has a configured preferred language.

Reproduction

  1. Have a preferred language configured
  2. Make a post containing only an image
  3. Have this post be popular enough to show on goodstuff or on the custom feeds branch go to a custom feed you know should show this post
  4. Observe the lack of the post showing

Actual behaviour

These posts are filtered out by the client and do not render.

Details

  • Platform: Web
  • Platform version: Observed most recently at commit e891039

Guess at cause

preferredLangOnly tuner contains the following if statement:

          if (
            hasProp(item.post.record, 'text') &&
            typeof item.post.record.text === 'string'
          ) {
            const res = lande(item.post.record.text)
            console.log(res)
            if (langsCode3.includes(res[0][0])) {
              hasPreferredLang = true
              break
            }
          } else {
            // no text? roll with it
            hasPreferredLang = true
            break
          }

This is missing an additional check to ensure that item.post.record.text is not an empty string.

@strideynet strideynet added the bug Something isn't working label May 25, 2023
@strideynet strideynet mentioned this issue May 25, 2023
10 tasks
@strideynet strideynet changed the title Posts containing only an image still undergo language analysis in the preferredLangOnly tuner Posts containing only an image do not show in goodstuff or on custom feeds May 25, 2023
@strideynet strideynet changed the title Posts containing only an image do not show in goodstuff or on custom feeds Posts containing only an image do not show in custom feeds May 26, 2023
@pfrazee
Copy link
Collaborator

pfrazee commented Jun 6, 2023

We plan to change language detection to be declared on the post by the author so that this isn't an issue anymore.

@pfrazee pfrazee added the x:on-the-roadmap We're planning to do this but it may be a bit label Jun 6, 2023
@strideynet
Copy link
Author

Closed by #871

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working x:on-the-roadmap We're planning to do this but it may be a bit
Projects
None yet
Development

No branches or pull requests

2 participants