Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

notification channels may allow listing agents whose changes shouldn't emit notifications #195

Open
elf-pavlik opened this issue Jul 30, 2024 · 0 comments
Assignees
Labels

Comments

@elf-pavlik
Copy link
Member

elf-pavlik commented Jul 30, 2024

This feature would be handy when agents making changes don't want to be notified about changes they just made. It should be an optional feature similar to state etc.

The client could ignore notifications if they always had ETag in response to the request making a change by comparing it to the state in the notification. In some approaches, this wouldn't suffice. For example, in my implementation of WebPushChannel (discussed in #140 (comment)), the intermediate party receiving the webhook and forwarding it to webpush is different than the party performing the operation, resulting in change. Even more, WebPush requires notifications to be shown to the user which results in user seeing a push notification whenever they make a change to any resource they are subscribed to.

Assuming predicate notify:ignoreChangesBy (to be bikeshed). To advertise the feature, the subscription service would do the usual:

{
  "@context": [
    "https://www.w3.org/ns/solid/notifications-context/v1"
  ],
  "id": "https://webhookexample/subscription",
  "channelType": "WebhookChannel2023",
  "feature": ["endAt", "rate", "state", "ignoreChangesBy"]
}

The client would subscribe with the following:

{
  "@context": [
    "https://www.w3.org/ns/solid/notifications-context/v1"
  ],
  "type": "WebhookChannel2023",
  "topic": "https://example.org/guinan/profile",
  "sendTo": "https://receiver.example/d4cf3f19",
  "startAt": "2023-01-01T07:00:00.000Z",
  "endAt": "2023-01-01T09:00:00.000Z",
  "rate": "PT5M",
  "state": "e75-TFJH",
  "ignoreChangesBy": [
    { "user": "https://alice.example" }
  ]
}

I'm also considering using user to allow client and possibly other options. It could be agent to match ACP's https://solidproject.org/TR/acp#matcher, but IMO, agent is too vague, and perhaps ACP should also consider changing it to user (going off-topic).

With the above, if http://alice.example makes the change, the notification would not be emitted to this channel.

I had a quick exchange about implementing it in CSS and I will be following up on that as we discuss it here.

@elf-pavlik elf-pavlik self-assigned this Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant