Adjust for Blacklist

This commit is contained in:
mr
2026-04-01 15:55:36 +02:00
parent bc7b1a2f29
commit 781b4e3add

View File

@@ -178,6 +178,7 @@ func (o *PeerController) changeRelation(id string, dest *peer.Peer, user string,
o.ServeJSON() o.ServeJSON()
return return
} }
rRelation := relation
if !dest.Verify { if !dest.Verify {
switch relation { switch relation {
case peer.PARTNER: case peer.PARTNER:
@@ -203,6 +204,11 @@ func (o *PeerController) changeRelation(id string, dest *peer.Peer, user string,
Payload: b, Payload: b,
}) })
} }
if rRelation == peer.BLACKLIST {
request.UpdateOne(map[string]interface{}{
"relation": rRelation,
}, dest.GetID())
}
o.Data["json"] = data o.Data["json"] = data
o.ServeJSON() o.ServeJSON()
return return