Closed LiranCohen closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.64%. Comparing base (
8446cdb
) to head (7e44b50
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@thehenrytsai addressed the review comments, and also created and added a reference to this issue:
https://github.com/TBD54566975/dwn-sdk-js/issues/768 for indexing RecordsDelete
messages associated with permission requests/grants/revocations.
This PR is to implement a
protocol
filter for theEventsQuery
interface which accounts for receiving permission messages scoped to the filtered protocol via tag filters, as well as other messages directly indexed to the protocol.It also resolves this issue https://github.com/TBD54566975/dwn-sdk-js/issues/663, which simplifies the type of filters
EventsQuery
implements to reduce complexity of which messages may or may not be returned with the filter.Since
EventsQuery
is being used for sync/selective sync, theprotocol
filter is most important, if further filters are needed down the line, we will implement them according to scenarios put in place so we can make sure the correct messages arrive with the query results.The Additional filters I left are for
interface
,method
andmessageTimestamp
which are compatible with all types of messages.NOTE: I cleaned up something I didn't like with
EventsQuery
from the prior PR instead of the message descriptor having an undefined filter, it is forced to have an empty filters array.NOTE2:
EventsSubscribe
does not yet handle filtering for protocols which include the permissions messages, that will be done in a separate PR.