Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

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

Dont suggest users that are muted or blocked (close #1185) (#1209)

authored by

Paul Frazee and committed by
GitHub
43d1f002 55ad56f6

+28 -6
+17 -4
src/state/models/discovery/foafs.ts
··· 105 105 const profile = profiles.data.profiles[i] 106 106 const source = this.sources[i] 107 107 if (res.status === 'fulfilled' && profile) { 108 - // filter out users already followed by the user or that *is* the user 108 + // filter out inappropriate suggestions 109 109 res.value.data.follows = res.value.data.follows.filter(follow => { 110 - return ( 111 - follow.did !== this.rootStore.me.did && !follow.viewer?.following 112 - ) 110 + const viewer = follow.viewer 111 + if (viewer) { 112 + if ( 113 + viewer.following || 114 + viewer.muted || 115 + viewer.mutedByList || 116 + viewer.blockedBy || 117 + viewer.blocking 118 + ) { 119 + return false 120 + } 121 + } 122 + if (follow.did === this.rootStore.me.did) { 123 + return false 124 + } 125 + return true 113 126 }) 114 127 115 128 runInAction(() => {
+11 -2
src/state/models/discovery/suggested-actors.ts
··· 85 85 this.hasMore = !!cursor 86 86 this.suggestions = this.suggestions.concat( 87 87 actors.filter(actor => { 88 - if (actor.viewer?.following) { 89 - return false 88 + const viewer = actor.viewer 89 + if (viewer) { 90 + if ( 91 + viewer.following || 92 + viewer.muted || 93 + viewer.mutedByList || 94 + viewer.blockedBy || 95 + viewer.blocking 96 + ) { 97 + return false 98 + } 90 99 } 91 100 if (actor.did === this.rootStore.me.did) { 92 101 return false