Integrating Nextcloud and XWiki with ActivityPub
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 499
- Forks
- 59
- Avg merge
- 3h 57m
- Merged PRs (30d)
- 196
Description
I'm a developer for XWiki project, and I'm starting to work on an implementation of ActivityPub for XWiki. As part of this implementation I'd like to make the first social integration with Nextcloud.
You can find some details about what we want to achieve in our Forum post announcing it and the first implementation I'm working on, in its dedicated repository
My first usecase here would be to be able to follow peope from Nextcloud on XWiki and if possible to follow people from XWiki on Nextcloud.
ActivityPub aims at defining a common protocol for everyone, but AFAIU it's vague enough to allow different implementation, so starting this issue as a communication channel to understand choices made on Nextcloud side to ensure both entities could communicate :)
I already started the work on XWiki side and performed some first tests on Nextcloud, so I already have some questions:
- it seems that all the JSON answers provided by Nextcloud Social are encapsulated in a main
resultobject which itselfs contains an object whose name depends on the kind of activity, which contains finally the activitystream entity.
For example, when accessing to my account I can see:
{
"result": {
"account": {
"@context": "https://www.w3.org/ns/activitystream",
"id": "http://localhost:4242/apps/social/@surli",
and when posting a note:
{
"result": {
"post": {
"id": "http:\/\/localhost:4242\/apps\/social\/@surli\/15816895591748213246",
"type": "Note"
Have you defined some way to know the name of the object in result based on ActivityStream vocabulary? On XWiki side I was going to use directly the ActiviyStream objects in the JSON answers (no wrapper around), could that be a problem for them to be processed by Nextcloud?
- I gave a try to post a very simple Follow activity in a Nextcloud inbox using the following request:
curl -X POST -H 'Content-Type: application/activity+json' -i 'http://localhost:4242/apps/social/@surli/inbox' --data '{
"@context": "https://www.w3.org/ns/activitystreams",
"summary": "XWiki Admin follow Nextcloud @surli",
"type": "Follow",
"actor": "http://localhost:8080/xwiki/activitypub/Person/XWiki.Admin",
"object": "attributedTo: http://localhost:4242/apps/social/@surli"
}'
and I obtained the following answer:
{"status":-1,"exception":"daita\MySmallPhpTools\Exceptions\MalformedArrayException","message":"source: [] - missing key: keyId"}
which I find quite cryptic :) Sounds like Nextcloud is expecting an id? Or is it related to the wrapping object I mentioned just before?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked XWiki forum post and application-activitypub repository, then reproduce the curl request against the Nextcloud Social inbox endpoint. Compare the response-wrapping expectations and the reported missing keyId error; the work is done when the interoperability requirements and a reproducible resolution are documented for both projects.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 18/100