Fix instance-wide actor webfinger lookup
This skips the silenced-user check. Ref T820
This commit is contained in:
parent
9b336dee8c
commit
9f525876f4
1 changed files with 11 additions and 8 deletions
19
webfinger.go
19
webfinger.go
|
@ -43,15 +43,18 @@ func (wfr wfResolver) FindUser(username string, host, requestHost string, r []we
|
||||||
log.Error("Unable to get blog: %v", err)
|
log.Error("Unable to get blog: %v", err)
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
silenced, err := wfr.db.IsUserSilenced(c.OwnerID)
|
|
||||||
if err != nil {
|
|
||||||
log.Error("webfinger find user: check is silenced: %v", err)
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
if silenced {
|
|
||||||
return nil, wfUserNotFoundErr
|
|
||||||
}
|
|
||||||
c.hostName = wfr.cfg.App.Host
|
c.hostName = wfr.cfg.App.Host
|
||||||
|
|
||||||
|
if !c.IsInstanceColl() {
|
||||||
|
silenced, err := wfr.db.IsUserSilenced(c.OwnerID)
|
||||||
|
if err != nil {
|
||||||
|
log.Error("webfinger find user: check is silenced: %v", err)
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if silenced {
|
||||||
|
return nil, wfUserNotFoundErr
|
||||||
|
}
|
||||||
|
}
|
||||||
if wfr.cfg.App.SingleUser {
|
if wfr.cfg.App.SingleUser {
|
||||||
// Ensure handle matches user-chosen one on single-user blogs
|
// Ensure handle matches user-chosen one on single-user blogs
|
||||||
if username != c.Alias {
|
if username != c.Alias {
|
||||||
|
|
Loading…
Add table
Reference in a new issue