Fix instance-wide actor webfinger lookup

This skips the silenced-user check.

Ref T820
pull/439/head
Matt Baer 4 years ago
parent 9b336dee8c
commit 9f525876f4
  1. 5
      webfinger.go

@ -43,6 +43,9 @@ 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
} }
c.hostName = wfr.cfg.App.Host
if !c.IsInstanceColl() {
silenced, err := wfr.db.IsUserSilenced(c.OwnerID) silenced, err := wfr.db.IsUserSilenced(c.OwnerID)
if err != nil { if err != nil {
log.Error("webfinger find user: check is silenced: %v", err) log.Error("webfinger find user: check is silenced: %v", err)
@ -51,7 +54,7 @@ func (wfr wfResolver) FindUser(username string, host, requestHost string, r []we
if silenced { if silenced {
return nil, wfUserNotFoundErr return nil, wfUserNotFoundErr
} }
c.hostName = wfr.cfg.App.Host }
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…
Cancel
Save