Skip to content

Commit

Permalink
Allow creator to bypass reply blocking on their own content
Browse files Browse the repository at this point in the history
  • Loading branch information
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
Expand Up @@ -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
}
}
}

Expand Down

0 comments on commit 195e667

Please sign in to comment.