parent
55ad56f689
commit
43d1f002f5
|
@ -105,11 +105,24 @@ export class FoafsModel {
|
||||||
const profile = profiles.data.profiles[i]
|
const profile = profiles.data.profiles[i]
|
||||||
const source = this.sources[i]
|
const source = this.sources[i]
|
||||||
if (res.status === 'fulfilled' && profile) {
|
if (res.status === 'fulfilled' && profile) {
|
||||||
// filter out users already followed by the user or that *is* the user
|
// filter out inappropriate suggestions
|
||||||
res.value.data.follows = res.value.data.follows.filter(follow => {
|
res.value.data.follows = res.value.data.follows.filter(follow => {
|
||||||
return (
|
const viewer = follow.viewer
|
||||||
follow.did !== this.rootStore.me.did && !follow.viewer?.following
|
if (viewer) {
|
||||||
)
|
if (
|
||||||
|
viewer.following ||
|
||||||
|
viewer.muted ||
|
||||||
|
viewer.mutedByList ||
|
||||||
|
viewer.blockedBy ||
|
||||||
|
viewer.blocking
|
||||||
|
) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (follow.did === this.rootStore.me.did) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
})
|
})
|
||||||
|
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
|
|
|
@ -85,8 +85,17 @@ export class SuggestedActorsModel {
|
||||||
this.hasMore = !!cursor
|
this.hasMore = !!cursor
|
||||||
this.suggestions = this.suggestions.concat(
|
this.suggestions = this.suggestions.concat(
|
||||||
actors.filter(actor => {
|
actors.filter(actor => {
|
||||||
if (actor.viewer?.following) {
|
const viewer = actor.viewer
|
||||||
return false
|
if (viewer) {
|
||||||
|
if (
|
||||||
|
viewer.following ||
|
||||||
|
viewer.muted ||
|
||||||
|
viewer.mutedByList ||
|
||||||
|
viewer.blockedBy ||
|
||||||
|
viewer.blocking
|
||||||
|
) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (actor.did === this.rootStore.me.did) {
|
if (actor.did === this.rootStore.me.did) {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in New Issue