[backend/federation] Check for Instance.IsSuspended in PreDeliverQueue for ASFollow activities
We're not currently using that property, but we may in the future.
This commit is contained in:
parent
9dbc7cfc14
commit
eb167cf482
1 changed files with 7 additions and 6 deletions
|
@ -140,12 +140,13 @@ file static class QueryableExtensions
|
||||||
this IQueryable<InboxQueryResult> query, ASActivity activity, DatabaseContext db
|
this IQueryable<InboxQueryResult> query, ASActivity activity, DatabaseContext db
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if (activity is ASFollow) return query;
|
return activity is ASFollow
|
||||||
return query.Where(user => !db.Instances.Any(p => p.Host == user.Host &&
|
? query.Where(user => !db.Instances.Any(p => p.Host == user.Host && p.IsSuspended))
|
||||||
((p.IsNotResponding &&
|
: query.Where(user => !db.Instances.Any(p => p.Host == user.Host &&
|
||||||
p.LastCommunicatedAt <
|
((p.IsNotResponding &&
|
||||||
DateTime.UtcNow - TimeSpan.FromDays(7)) ||
|
p.LastCommunicatedAt <
|
||||||
p.IsSuspended)));
|
DateTime.UtcNow - TimeSpan.FromDays(7)) ||
|
||||||
|
p.IsSuspended)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static IQueryable<InboxQueryResult> SkipBlockedInstances(
|
public static IQueryable<InboxQueryResult> SkipBlockedInstances(
|
||||||
|
|
Loading…
Add table
Reference in a new issue