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

Apply labelers and handle language for PWI home #5816

Merged
merged 1 commit into from
Oct 17, 2024
Merged

Conversation

estrattonbailey
Copy link
Member

@estrattonbailey estrattonbailey commented Oct 17, 2024

Noticed two things were happening:

  1. PWI wasn't applying mod authorities to getFeed requests
  2. PWI language selector wasn't applying to getFeed requests

I don't think we've ever noticed the first, and the second I broke when I untangled appLanguage from contentLanguages in #5384. We used to set contentLanguages to match the appLanguage when that field was changed. I understood this to be a UX decision without realizing that it was load bearing for the PWI experience. Since post record lang field doesn't support regional codes either, I don't think this has ever worked as intended for "app" languages with region codes.

This PR borrows the labeler logic from our base Agent class, and pulls the language value we pass to getFeed from the appLanguage setting, stripping out a region code if it exists.

Testing

  • check that atproto-accept-labelers is applied for PWI feed fetches
    • you can check atproto-content-labelers to see which are applied
  • switch languages to our large market languages and make sure there's different content

@arcalinea arcalinea temporarily deployed to fix-pwi-feed - social-app PR #5816 October 17, 2024 20:20 — with Render Destroyed
Copy link

Old size New size Diff
7.9 MB 7.9 MB 149 B (0.00%)

@estrattonbailey estrattonbailey merged commit 05ca979 into main Oct 17, 2024
6 checks passed
haileyok pushed a commit that referenced this pull request Oct 17, 2024
rshigg pushed a commit to rshigg/social-app that referenced this pull request Nov 2, 2024
rshigg pushed a commit to rshigg/social-app that referenced this pull request Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants