Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow creator to bypass reply blocking on their own content
Browse files Browse the repository at this point in the history
miko committed Jan 18, 2025
1 parent 45986a5 commit 195e667
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions server/services/v1/comments/create.go
Original file line number Diff line number Diff line change
@@ -176,9 +176,19 @@ func checkAllowedAndValidate(request *createRequest) error {
}

if request.args.ParentID != nil {
err = helper.AllowedToRespond(util.StrFromPtr(request.args.ParentID), request.args.ChannelID)
isCreator := false
signingChannel, err := lbry.SDK.GetSigningChannelForClaim(request.args.ClaimID)
if err != nil {
return err
return errors.Err(err)
}
if signingChannel != nil {
isCreator = request.args.ChannelID == signingChannel.ClaimID
}
if !isCreator {
err = helper.AllowedToRespond(util.StrFromPtr(request.args.ParentID), request.args.ChannelID)
if err != nil {
return err
}
}
}

0 comments on commit 195e667

Please sign in to comment.