mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
@@ -46,6 +46,11 @@ func (p *processor) BlockCreate(ctx context.Context, requestingAccount *gtsmodel
|
||||
return p.RelationshipGet(ctx, requestingAccount, targetAccountID)
|
||||
}
|
||||
|
||||
// don't block yourself, silly
|
||||
if requestingAccount.ID == targetAccountID {
|
||||
return nil, gtserror.NewErrorNotAcceptable(fmt.Errorf("BlockCreate: account %s cannot block itself", requestingAccount.ID))
|
||||
}
|
||||
|
||||
// make the block
|
||||
block := >smodel.Block{}
|
||||
newBlockID, err := id.NewULID()
|
||||
|
Reference in New Issue
Block a user