From 2773ae5bbfc37a2598c1a0e36131d05e4db53352 Mon Sep 17 00:00:00 2001 From: Clemens Date: Tue, 1 Aug 2023 11:52:05 +0200 Subject: [PATCH] Added uri test via lambdaisland --- firstpage.json | 821 ++++++++++++++++++ .../activity_pub_poc/activitystreams2.cljc | 3 +- .../activity_pub_poc/predicates.cljc | 10 +- .../activitystreams2_test.cljc | 7 +- 4 files changed, 835 insertions(+), 6 deletions(-) create mode 100644 firstpage.json diff --git a/firstpage.json b/firstpage.json new file mode 100644 index 0000000..736ca44 --- /dev/null +++ b/firstpage.json @@ -0,0 +1,821 @@ +{ + "@context": [ + "https://www.w3.org/ns/activitystreams", + { + "ostatus": "http://ostatus.org#", + "atomUri": "ostatus:atomUri", + "inReplyToAtomUri": "ostatus:inReplyToAtomUri", + "conversation": "ostatus:conversation", + "sensitive": "as:sensitive", + "toot": "http://joinmastodon.org/ns#", + "votersCount": "toot:votersCount", + "Hashtag": "as:Hashtag" + } + ], + "id": "https://social.meissa-gmbh.de/users/team/outbox?page=true", + "type": "OrderedCollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/outbox?max_id=110533184356511348&page=true", + "prev": "https://social.meissa-gmbh.de/users/team/outbox?min_id=110807277003752527&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/outbox", + "orderedItems": [ + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110807277003752527/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-31T06:27:46Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.coop/users/smallcircles", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://social.coop/users/smallcircles/statuses/110807228679467860" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-29T09:23:05Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://mstdn.io/users/veer66" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354", + "type": "Note", + "summary": null, + "inReplyTo": "https://mstdn.io/users/veer66/statuses/110793983318858389", + "published": "2023-07-29T09:23:05Z", + "url": "https://social.meissa-gmbh.de/@team/110796641755949354", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://mstdn.io/users/veer66" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354", + "inReplyToAtomUri": "https://mstdn.io/users/veer66/statuses/110793983318858389", + "conversation": "tag:social.meissa-gmbh.de,2023-07-28:objectId=908302:objectType=Conversation", + "content": "

@veer66 we choose clojure spec for two reasons:

1. we know clojure
2. spec has a nice structure (namespaced, reusable predicates, compact) that's fitting very well to LD.

But yes, ActivityStreams is very hard to translate - I would say it is not well designed.

There are
* circular definitions
* undefined fundaments (we've not found the @type definition)
* invalid specs (@type="Activity" where "Activity" sould be uri)

So the only way to come to good foundation seems to have unittest 🙂

", + "contentMap": { + "en": "

@veer66 we choose clojure spec for two reasons:

1. we know clojure
2. spec has a nice structure (namespaced, reusable predicates, compact) that's fitting very well to LD.

But yes, ActivityStreams is very hard to translate - I would say it is not well designed.

There are
* circular definitions
* undefined fundaments (we've not found the @type definition)
* invalid specs (@type="Activity" where "Activity" sould be uri)

So the only way to come to good foundation seems to have unittest 🙂

" + }, + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://mstdn.io/users/veer66", + "name": "@veer66@mstdn.io" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110796641755949354/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-28T16:11:49Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-07-28T16:11:49Z", + "url": "https://social.meissa-gmbh.de/@team/110792586683572767", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-07-28:objectId=908302:objectType=Conversation", + "content": "

Mapping ActivityStreams2 to #clojure spec is not as trivial as we hoped. But after some blood, sweat and tears we can now show first results:

https://repo.prod.meissa.de/meissa/activity-pub-poc/src/branch/object-or-refernce/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc

And yes, at least we've proven our spec definitions by unittests :-)

We are intersted in feedback & discussion.

Are there any #LinkedData experts around?

", + "contentMap": { + "en": "

Mapping ActivityStreams2 to #clojure spec is not as trivial as we hoped. But after some blood, sweat and tears we can now show first results:

https://repo.prod.meissa.de/meissa/activity-pub-poc/src/branch/object-or-refernce/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc

And yes, at least we've proven our spec definitions by unittests :-)

We are intersted in feedback & discussion.

Are there any #LinkedData experts around?

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/clojure", + "name": "#clojure" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/linkeddata", + "name": "#linkeddata" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110792586683572767/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-24T06:10:40Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-07-24T06:10:40Z", + "url": "https://social.meissa-gmbh.de/@team/110767573622386133", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-07-24:objectId=902226:objectType=Conversation", + "content": "

We like the ideas of domain-driven-design and adopt these principles to #clojure #python #java and #kotlin

Today we present ddadevops.

ddadevops is a build to bring all the devops tools, we use, together.

Our statement is:

"DevOps Builds are also a Domain, worth to be modeled."

In case of interest here is our domain-model::

https://repo.prod.meissa.de/meissa/dda-devops-build/src/branch/main/doc/architecture/Domain.md

", + "contentMap": { + "en": "

We like the ideas of domain-driven-design and adopt these principles to #clojure #python #java and #kotlin

Today we present ddadevops.

ddadevops is a build to bring all the devops tools, we use, together.

Our statement is:

"DevOps Builds are also a Domain, worth to be modeled."

In case of interest here is our domain-model::

https://repo.prod.meissa.de/meissa/dda-devops-build/src/branch/main/doc/architecture/Domain.md

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/clojure", + "name": "#clojure" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/python", + "name": "#python" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/java", + "name": "#java" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/kotlin", + "name": "#kotlin" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110767573622386133/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110739556383311880/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-19T07:25:31Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://fairmove.net/users/rasos", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://fairmove.net/users/rasos/statuses/110733469611422708" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110688401901905918/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-10T06:36:16Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://social.meissa-gmbh.de/users/team/statuses/107937234506182462" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110671331405100935/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-07T06:15:01Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/jerger", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://social.meissa-gmbh.de/users/jerger/statuses/110663396442450033" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110654311944113983/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-04T06:06:44Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://digitalcourage.social/users/digitalcourage", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://digitalcourage.social/users/digitalcourage/statuses/110650405759684392" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-07-03T06:36:15Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://tech.lgbt/users/arisunz" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923", + "type": "Note", + "summary": null, + "inReplyTo": "https://tech.lgbt/users/arisunz/statuses/110629503530280714", + "published": "2023-07-03T06:36:15Z", + "url": "https://social.meissa-gmbh.de/@team/110648765695607923", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://tech.lgbt/users/arisunz" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923", + "inReplyToAtomUri": "https://tech.lgbt/users/arisunz/statuses/110629503530280714", + "conversation": "tag:tech.lgbt,2023-06-29:objectId=74304922:objectType=Conversation", + "content": "

@arisunz absolutely yes !

If you need a setup on k8s having backup & monitoring included have a look at:

https://repo.prod.meissa.de/meissa/c4k-forgejo

For the curious ones we've added an flag to try out federated forgejo :-)

", + "contentMap": { + "en": "

@arisunz absolutely yes !

If you need a setup on k8s having backup & monitoring included have a look at:

https://repo.prod.meissa.de/meissa/c4k-forgejo

For the curious ones we've added an flag to try out federated forgejo :-)

" + }, + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://tech.lgbt/users/arisunz", + "name": "@arisunz@tech.lgbt" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110648765695607923/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-30T16:59:44Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-30T16:59:44Z", + "url": "https://social.meissa-gmbh.de/@team/110634230411050714", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-30:objectId=872251:objectType=Conversation", + "content": "

How looks a federate git repository?

You may ask

https://federated-repo.test.meissa.de/api/v1/activitypub/repo/jem/federation-test-repo

to find out :-)

If you want to explore the api, visit https://federated-repo.test.meissa.de/api/swagger

Credits to @a:exozy.me and the federation team for the cool work.

#fediverse #forgejo

", + "contentMap": { + "en": "

How looks a federate git repository?

You may ask

https://federated-repo.test.meissa.de/api/v1/activitypub/repo/jem/federation-test-repo

to find out :-)

If you want to explore the api, visit https://federated-repo.test.meissa.de/api/swagger

Credits to @a:exozy.me and the federation team for the cool work.

#fediverse #forgejo

" + }, + "updated": "2023-06-30T17:01:41Z", + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/fediverse", + "name": "#fediverse" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/forgejo", + "name": "#forgejo" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110634230411050714/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110633727438806861/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-30T14:51:50Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://infosec.exchange/users/hacks4pancakes", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://infosec.exchange/users/hacks4pancakes/statuses/110629108513964921" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-30T14:47:23Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-30T14:47:23Z", + "url": "https://social.meissa-gmbh.de/@team/110633709992879670", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-30:objectId=872079:objectType=Conversation", + "content": "

Wir freuen uns schon auf euch auf der #tübix - wir werden über #k8s, d#evops und das #fediverse vortragen :-)

", + "contentMap": { + "de": "

Wir freuen uns schon auf euch auf der #tübix - wir werden über #k8s, d#evops und das #fediverse vortragen :-)

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/tubix", + "name": "#tubix" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/k8s", + "name": "#k8s" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/fediverse", + "name": "#fediverse" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110633709992879670/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-28T15:55:11Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-28T15:55:11Z", + "url": "https://social.meissa-gmbh.de/@team/110622651916588933", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-28:objectId=869594:objectType=Conversation", + "content": "

We started a #federated #forgejo instance for experiments:

https://federated-repo.test.meissa.de

Feel free to create an account and look around.

The instance will be wiped and recreated from time to time.

", + "contentMap": { + "en": "

We started a #federated #forgejo instance for experiments:

https://federated-repo.test.meissa.de

Feel free to create an account and look around.

The instance will be wiped and recreated from time to time.

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/federated", + "name": "#federated" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/forgejo", + "name": "#forgejo" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110622651916588933/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-28T15:20:39Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-28T15:20:39Z", + "url": "https://social.meissa-gmbh.de/@team/110622516167497343", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-28:objectId=869539:objectType=Conversation", + "content": "

Huhu, wer von euch ist auch auf der #Tubix ?

Wollen wir uns dort treffen?

Wir halten dort Vorträge zum #DevOps #K8s und zum #Fediverse und freuen uns auf echte Gesichter zu den ganzen Followern 😉

", + "contentMap": { + "de": "

Huhu, wer von euch ist auch auf der #Tubix ?

Wollen wir uns dort treffen?

Wir halten dort Vorträge zum #DevOps #K8s und zum #Fediverse und freuen uns auf echte Gesichter zu den ganzen Followern 😉

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/tubix", + "name": "#tubix" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/devops", + "name": "#devops" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/k8s", + "name": "#k8s" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/fediverse", + "name": "#fediverse" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110622516167497343/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110575090467177748/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-20T06:19:41Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://defcon.social/users/mysk", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://defcon.social/users/mysk/statuses/110573066626397762" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110575086022999926/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-20T06:18:33Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://infosec.exchange/users/Em0nM4stodon", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://infosec.exchange/users/Em0nM4stodon/statuses/110493163504089348" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110572084879236042/activity", + "type": "Announce", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-19T17:35:19Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://hostsharing.coop/users/do_foss", + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": "https://hostsharing.coop/users/do_foss/statuses/110554801053590138" + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-19T06:26:07Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-19T06:26:07Z", + "url": "https://social.meissa-gmbh.de/@team/110569453496913938", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-19:objectId=858501:objectType=Conversation", + "content": "

After your fine expansion work I think it would be cool to have a spec for validating the AP data.

In theory the line from eg. https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name to https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-schema/index.html#ch_langstring should be straight.

a ld2spec converter seems feasible, but ...

* The "range" property in AS-json-ld is missing - are other dialects more complete?
* rdf:schema is not served as json-ld - other dialects to parse?

Do you have an idea for a good way through these difficulties?

#json-ld #clojure #ActivityPub

", + "contentMap": { + "en": "

After your fine expansion work I think it would be cool to have a spec for validating the AP data.

In theory the line from eg. https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name to https://dvcs.w3.org/hg/rdf/raw-file/default/rdf-schema/index.html#ch_langstring should be straight.

a ld2spec converter seems feasible, but ...

* The "range" property in AS-json-ld is missing - are other dialects more complete?
* rdf:schema is not served as json-ld - other dialects to parse?

Do you have an idea for a good way through these difficulties?

#json-ld #clojure #ActivityPub

" + }, + "attachment": [], + "tag": [ + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/JSON", + "name": "#JSON" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/clojure", + "name": "#clojure" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/activitypub", + "name": "#activitypub" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110569453496913938/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-19T06:15:26Z", + "to": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://toot.cat/users/plexus" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994", + "type": "Note", + "summary": null, + "inReplyTo": null, + "published": "2023-06-19T06:15:26Z", + "url": "https://social.meissa-gmbh.de/@team/110569411448434994", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://social.meissa-gmbh.de/users/team/followers" + ], + "cc": [ + "https://www.w3.org/ns/activitystreams#Public", + "https://toot.cat/users/plexus" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994", + "inReplyToAtomUri": null, + "conversation": "tag:social.meissa-gmbh.de,2023-06-14:objectId=853127:objectType=Conversation", + "content": "

@plexus ... we did some experiments with your solution .. ld-json & activitypub works fine :-)

https://repo.prod.meissa.de/meissa/activity-pub-poc

Are you interested in small PRs for small improvements?

#json-ld #clojure #ActivityPub

", + "contentMap": { + "en": "

@plexus ... we did some experiments with your solution .. ld-json & activitypub works fine :-)

https://repo.prod.meissa.de/meissa/activity-pub-poc

Are you interested in small PRs for small improvements?

#json-ld #clojure #ActivityPub

" + }, + "updated": "2023-06-19T06:16:36Z", + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://toot.cat/users/plexus", + "name": "@plexus@toot.cat" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/JSON", + "name": "#JSON" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/clojure", + "name": "#clojure" + }, + { + "type": "Hashtag", + "href": "https://social.meissa-gmbh.de/tags/activitypub", + "name": "#activitypub" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110569411448434994/replies", + "items": [] + } + } + } + }, + { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348/activity", + "type": "Create", + "actor": "https://social.meissa-gmbh.de/users/team", + "published": "2023-06-12T20:42:24Z", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://mastodon.social/users/kidehen" + ], + "object": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348", + "type": "Note", + "summary": null, + "inReplyTo": "https://mastodon.social/users/kidehen/statuses/110531917036824266", + "published": "2023-06-12T20:42:24Z", + "url": "https://social.meissa-gmbh.de/@team/110533184356511348", + "attributedTo": "https://social.meissa-gmbh.de/users/team", + "to": [ + "https://www.w3.org/ns/activitystreams#Public" + ], + "cc": [ + "https://social.meissa-gmbh.de/users/team/followers", + "https://mastodon.social/users/kidehen" + ], + "sensitive": false, + "atomUri": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348", + "inReplyToAtomUri": "https://mastodon.social/users/kidehen/statuses/110531917036824266", + "conversation": "tag:mastodon.social,2023-06-12:objectId=466638933:objectType=Conversation", + "content": "

@kidehen do you have a link for the RelAuthMe protocol?

", + "contentMap": { + "en": "

@kidehen do you have a link for the RelAuthMe protocol?

" + }, + "attachment": [], + "tag": [ + { + "type": "Mention", + "href": "https://mastodon.social/users/kidehen", + "name": "@kidehen@mastodon.social" + } + ], + "replies": { + "id": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348/replies", + "type": "Collection", + "first": { + "type": "CollectionPage", + "next": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348/replies?only_other_accounts=true&page=true", + "partOf": "https://social.meissa-gmbh.de/users/team/statuses/110533184356511348/replies", + "items": [] + } + } + } + } + ] +} diff --git a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc index b5a25d5..251f301 100644 --- a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2.cljc @@ -88,8 +88,7 @@ ;https://www.w3.org/TR/activitystreams-vocabulary/#dfn-type ;TODO: this can not be found in the ttl / namespace. Where is this exactly defined? (s/def ::type - any?;::xsd/anyURI - ) + ::xsd/anyURI) ;http://www.w3.org/ns/activitystreams#result (s/def ::result diff --git a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/predicates.cljc b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/predicates.cljc index 2973182..1f82363 100644 --- a/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/predicates.cljc +++ b/src/main/cljc/org/domaindrivenarchitecture/activity_pub_poc/predicates.cljc @@ -1,6 +1,10 @@ (ns org.domaindrivenarchitecture.activity-pub-poc.predicates - (:require [clojure.string :as str])) + (:require [clojure.string :as str] + [lambdaisland.uri :as uri])) +; TODO: Find out, how this can be better parsed (e.g. via lambdaisland/uri) (defn uri-string? [input] - (and (string? input) - (re-matches #"\w+:(\/?\/?)[^\s]+" input))) \ No newline at end of file + (let [parsed-uri (uri/uri input)] + (= input (str parsed-uri)))) + ;(and (string? input) + ; (re-matches #"\w+:(\/?\/?)[^\s]+" input))) \ No newline at end of file diff --git a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc index 4f371f2..a69ee36 100644 --- a/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc +++ b/src/test/cljc/org/domaindrivenarchitecture/activity_pub_poc/activitystreams2_test.cljc @@ -9,7 +9,7 @@ (is (s/valid? ::sut/id "https://social.bla/alyssa/status/RANDOMHASH")) (is (not (s/valid? ::sut/id nil))) (is (not (s/valid? ::sut/id 2))) - (is (not (s/valid? ::sut/id "no-uri"))) + (is (not (s/valid? ::sut/id "https://no-uri:abc"))) (is (not (s/valid? ::sut/id ["https://social.bla/alyssa/status/RANDOMHASH", "https://social.bla/alyssa/status/RANDOMHASH2"])))) (deftest object-test @@ -72,6 +72,11 @@ :type "Like", :actor {:type "Person", :name "Sally"}, + :object "http://example.org/notes/1"})) + (is (s/valid? ::sut/Like + {:id "foo", + :type "Like", + :actor "https://social.bla/alyssa", :object "http://example.org/notes/1"}))) (deftest Object-test