Make sure a "Reject" event removes "accepted" state (if any)
This commit is contained in:
parent
8adfdac253
commit
51c29b034b
|
@ -39,8 +39,10 @@ module.exports = {
|
|||
if (msg.object.type === 'Follow') {
|
||||
const follow = await db.getAPObject(msg.object.id, 'Follow')
|
||||
if (follow !== null)
|
||||
await db.table.objects().updateOne({ _id: follow._id },
|
||||
{ $set: { rejected: true } })
|
||||
await db.table.objects().updateOne({ _id: follow._id }, {
|
||||
$set: { rejected: true },
|
||||
$unset: { accepted: 1 },
|
||||
})
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue