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

Create a utility to send notifications to an inbox #1

Open
8 tasks
RubenVerborgh opened this issue Nov 11, 2020 · 1 comment
Open
8 tasks

Create a utility to send notifications to an inbox #1

RubenVerborgh opened this issue Nov 11, 2020 · 1 comment
Assignees

Comments

@RubenVerborgh
Copy link
Contributor

RubenVerborgh commented Nov 11, 2020

I suggest the creation of a JavaScript/TypeScript utility for sending LDNs. Here is a suggested plan of action:

  • Make a simple utility that sends a yo
  • Make it accessible from the command line
    • Taking sender and destination as parameter
    • Allowing sender to be set in a configuration file
  • Extend the utility to be able so send data with different shapes
    • Using either ShEx or SHACL
    • Allow an arbitrary shape to be passed as parameter
    • Make it easy to fill out shapes from the command line
@Dexagod
Copy link

Dexagod commented Nov 23, 2020

Some questions

  • Should the ability be present to send notifications without the user authenticating itself?
    • Currently i use the auth.fetch() method to post notifications, although this should also be possible with a regular POST request?
    • This could also be useful in the case that there are public inboxes -> does this even exist? that can be read by everyone.
  • Should the sender always be specified in the notification?
    • This could for example be done using a creator predicate, or using the activitystreams 2.0 model by wrapping the notification (see code example)
    • This makes it possible to let user / services set their own actor as jsonld in the config file, to attach any useful information they want to attach to the actor in the wrapper of every notification
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "Alice sent a notification to Bob, with Carol in CC and Dennis in BCC",
"actor": { 
  "@id": http://alice.example.org",
  "@type": "Person" // (Or Service, ... in the case of a service. See link down below. This can be set in the config file)
"object": { WRAPPED NOTIFICATION } ,
"target": "http://bob.example.org",
"cc: [ "http://carol.example.org" ]
"bcc": [ "http://dennis.example.org" ]

see the available actor types in activitystreams 2.0```

  • To make shapes easy to use, it might make sense to require them to be passed via files when on the command line?
  • Or maybe to use a simple template based on the activitystreams2.0 model?
    • solid-notifications -u alice.example.org -p passwd -i example.org bob.example.org {type: Note, content: "Hey, long time no see"
    • results in:
"@context": "https://www.w3.org/ns/activitystreams",
"actor": http://alice.example.org",
"object": { WRAPPED NOTIFICATION } ,
"target": "http://bob.example.org",
  • Should version 1 include authorization headers on the request?
    • if so, exactly which token should be added :p (I am not sure how to approach this, as there are multiple tokens in the auth object)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants