mirror of https://git.lenooby09.tech/LeNooby09/social-app.git

Send inferrable interactions to third-party feeds (#9094)

authored by danabra.mov and committed by GitHub 22bb9c59 7f4e3091

Changed files
+15 -3
src
+15 -3
src/state/feed-feedback.tsx
··· 28 28 29 29 export const FEEDBACK_FEEDS = [...PROD_FEEDS, ...STAGING_FEEDS] 30 30 31 - export const DIRECT_FEEDBACK_INTERACTIONS = new Set< 31 + export const THIRD_PARTY_ALLOWED_INTERACTIONS = new Set< 32 32 AppBskyFeedDefs.Interaction['event'] 33 - >(['app.bsky.feed.defs#requestLess', 'app.bsky.feed.defs#requestMore']) 33 + >([ 34 + // These are explicit actions and are therefore fine to send. 35 + 'app.bsky.feed.defs#requestLess', 36 + 'app.bsky.feed.defs#requestMore', 37 + // These can be inferred from the firehose and are therefore fine to send. 38 + 'app.bsky.feed.defs#interactionLike', 39 + 'app.bsky.feed.defs#interactionQuote', 40 + 'app.bsky.feed.defs#interactionReply', 41 + 'app.bsky.feed.defs#interactionRepost', 42 + // This can be inferred from pagination requests for everything except the very last page 43 + // so it is fine to send. It is crucial for third party algorithmic feeds to receive these. 44 + 'app.bsky.feed.defs#interactionSeen', 45 + ]) 34 46 35 47 const logger = Logger.create(Logger.Context.FeedFeedback) 36 48 ··· 228 240 return false 229 241 } 230 242 const isDiscover = isDiscoverFeed(feed.feedDescriptor) 231 - return isDiscover ? true : DIRECT_FEEDBACK_INTERACTIONS.has(interaction) 243 + return isDiscover ? true : THIRD_PARTY_ALLOWED_INTERACTIONS.has(interaction) 232 244 } 233 245 234 246 function toString(interaction: AppBskyFeedDefs.Interaction): string {