diff options
author | 2024-03-14 16:55:35 +0000 | |
---|---|---|
committer | 2024-03-14 17:55:35 +0100 | |
commit | 459e75a9dbf1a603e040bedc639f5209184be5ce (patch) | |
tree | 29b95ce7b36ead81a670da65a3796bbe5b347187 | |
parent | [chore] Expose move endpoint again, small settings panel fixes (#2752) (diff) | |
download | gotosocial-459e75a9dbf1a603e040bedc639f5209184be5ce.tar.xz |
[bugfix] only check replyTo visibility during permission checks IF status is local (#2757)
-rw-r--r-- | internal/federation/dereferencing/status.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/internal/federation/dereferencing/status.go b/internal/federation/dereferencing/status.go index c8012178c..769539a2f 100644 --- a/internal/federation/dereferencing/status.go +++ b/internal/federation/dereferencing/status.go @@ -621,19 +621,23 @@ func (d *Dereferencer) isPermittedStatus( return onFail() } - // Check visibility of inReplyTo to status author. - permitted, err = d.visibility.StatusVisible(ctx, - status.Account, - status.InReplyTo, - ) - if err != nil { - return false, gtserror.Newf("error checking in-reply-to visibility: %w", err) + // Default to true + permitted = true + + if *status.InReplyTo.Local { + // Check visibility of inReplyTo to status author. + permitted, err = d.visibility.StatusVisible(ctx, + status.Account, + status.InReplyTo, + ) + if err != nil { + return false, gtserror.Newf("error checking in-reply-to visibility: %w", err) + } } if permitted && *status.InReplyTo.Replyable { - // This status is visible AND - // replyable, in this economy?! + // Status is reply-able to. return true, nil } |