Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Filter out bad mentions instead of erroring during post (close #391) (#422)

authored by

Paul Frazee and committed by
GitHub
0c9935f1 0407e93e

+12
+12
src/lib/api/index.ts
··· 3 3 AppBskyEmbedExternal, 4 4 AppBskyEmbedRecord, 5 5 AppBskyEmbedRecordWithMedia, 6 + AppBskyRichtextFacet, 6 7 ComAtprotoRepoUploadBlob, 7 8 RichText, 8 9 } from '@atproto/api' ··· 82 83 83 84 opts.onStateChange?.('Processing...') 84 85 await rt.detectFacets(store.agent) 86 + 87 + // filter out any mention facets that didn't map to a user 88 + rt.facets = rt.facets?.filter(facet => { 89 + const mention = facet.features.find(feature => 90 + AppBskyRichtextFacet.isMention(feature), 91 + ) 92 + if (mention && !mention.did) { 93 + return false 94 + } 95 + return true 96 + }) 85 97 86 98 if (opts.quote) { 87 99 embed = {