Skip to content
This repository has been archived by the owner on Jan 2, 2025. It is now read-only.

Commit

Permalink
fix(daemon): not indexing deleted accounts
Browse files Browse the repository at this point in the history
  • Loading branch information
juligasa committed Apr 23, 2024
1 parent bdb48b3 commit e85f136
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions backend/hyper/indexing.go
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,10 @@ func (bs *indexer) indexChange(idx *indexingCtx, id int64, c cid.Cid, v Change)
// Indexing specific to various types of Entities
switch {
case v.Entity.HasPrefix("hm://a/"):
res, err := hypersql.EntitiesLookupRemovedRecord(idx.conn, sb.Resource.ID.String())
if err == nil && res.DeletedResourcesIRI == sb.Resource.ID.String() {
return fmt.Errorf("Change belongs to a deleted account [%s]", res.DeletedResourcesIRI)
}
if v, ok := v.Patch["avatar"].(cid.Cid); ok {
sb.AddBlobLink("account/avatar", v)
}
Expand Down

0 comments on commit e85f136

Please sign in to comment.