TBD54566975 / dwn-sdk-js

Decentralized Web Node (DWN) Reference implementation
https://identity.foundation/decentralized-web-node/spec/
Apache License 2.0
324 stars 95 forks source link

RecordDelete is not being received in a subscription when it is expected #759

Open LiranCohen opened 2 months ago

LiranCohen commented 2 months ago

Example Scenario:

  1. Bob installs the chat protocol and creates a thread, adding Alice as a participant.
  2. Alice creates a subscription to receive events using the delegated grant.
  3. Bob writes two chat messages to the thread.
  4. Bob deletes one of the chat messages.

Expected: The subscription handler should have received both the chat writes and the delete. Actual: The subscription received only the writes.

When subscribing using protocol rules, a set of filters are built to match against the indexes created when storing the Delete. Investigate modifying the filters/indexing to allow for the expected behavior.