Emit deactivation event on updateSubjectStatus ()

* emit account event on updateSubjectSTatus

* changeset

* tidy

* dont double emit

* rerun CI

* rerun CI
This commit is contained in:
Daniel Holmgren 2024-06-04 16:45:01 -05:00 committed by GitHub
parent 5441fbde9e
commit d8e2fefa98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions
.changeset
packages/pds/src/api/com/atproto/admin

@ -0,0 +1,5 @@
---
"@atproto/pds": patch
---
Emit an account event on updateSubjectStatus.

@ -17,8 +17,6 @@ export default function (server: Server, ctx: AppContext) {
if (takedown) {
if (isRepoRef(subject)) {
await ctx.accountManager.takedownAccount(subject.did, takedown)
const status = await ctx.accountManager.getAccountStatus(subject.did)
await ctx.sequencer.sequenceAccountEvt(subject.did, status)
} else if (isStrongRef(subject)) {
const uri = new AtUri(subject.uri)
await ctx.actorStore.transact(uri.hostname, (store) =>
@ -46,6 +44,11 @@ export default function (server: Server, ctx: AppContext) {
}
}
if (isRepoRef(subject)) {
const status = await ctx.accountManager.getAccountStatus(subject.did)
await ctx.sequencer.sequenceAccountEvt(subject.did, status)
}
return {
encoding: 'application/json',
body: {