Documentation and acknowledgement
This commit is contained in:
parent
ed7d4e22f1
commit
5593bb22d1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,7 @@
|
||||||
(ns clj-activitypub.core
|
(ns clj-activitypub.core
|
||||||
|
"copied from [Jahfer's clj-activitypub library](https://github.com/jahfer/clj-activitypub).
|
||||||
|
If and when Jahfer issues a release of that library, this directory will be deleted and a
|
||||||
|
dependency on that library will be added to the project."
|
||||||
(:require [clj-activitypub.internal.crypto :as crypto]
|
(:require [clj-activitypub.internal.crypto :as crypto]
|
||||||
[clj-activitypub.internal.thread-cache :as thread-cache]
|
[clj-activitypub.internal.thread-cache :as thread-cache]
|
||||||
[clj-activitypub.internal.http-util :as http]
|
[clj-activitypub.internal.http-util :as http]
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
(ns clj-activitypub.webfinger
|
(ns clj-activitypub.webfinger
|
||||||
|
"copied from [Jahfer's clj-activitypub library](https://github.com/jahfer/clj-activitypub).
|
||||||
|
If and when Jahfer issues a release of that library, this directory will be deleted and a
|
||||||
|
dependency on that library will be added to the project."
|
||||||
(:require [clj-http.client :as client]
|
(:require [clj-http.client :as client]
|
||||||
[clj-activitypub.internal.http-util :as http]
|
[clj-activitypub.internal.http-util :as http]
|
||||||
[clj-activitypub.internal.thread-cache :as thread-cache]))
|
[clj-activitypub.internal.thread-cache :as thread-cache]))
|
||||||
|
|
|
@ -112,7 +112,19 @@
|
||||||
true))
|
true))
|
||||||
|
|
||||||
(defn activity?
|
(defn activity?
|
||||||
"`true` iff `x` quacks like an activity, else false."
|
"`true` iff `x` quacks like an activity, else false.
|
||||||
|
|
||||||
|
**NOTE THAT** [Section 4.1 of the spec]
|
||||||
|
(https://www.w3.org/TR/activitypub/#actor-objects) says explicitly that
|
||||||
|
|
||||||
|
> Actor objects MUST have, in addition to the properties mandated by 3.1 Object Identifiers, the following properties:
|
||||||
|
>
|
||||||
|
> inbox
|
||||||
|
> A reference to an [ActivityStreams] OrderedCollection comprised of all the messages received by the actor; see 5.2 Inbox.
|
||||||
|
> outbox
|
||||||
|
> An [ActivityStreams] OrderedCollection comprised of all the messages produced by the actor; see 5.1 Outbox.
|
||||||
|
|
||||||
|
However, none of the provided examples in the [activitystreams-test-documents repository]() does in fact have these properties"
|
||||||
[x]
|
[x]
|
||||||
(try
|
(try
|
||||||
(and (object? x)
|
(and (object? x)
|
||||||
|
|
|
@ -43,3 +43,5 @@
|
||||||
(count objects)
|
(count objects)
|
||||||
(map :type objects))))
|
(map :type objects))))
|
||||||
(file-seq (file "resources/activitystreams-test-documents")))
|
(file-seq (file "resources/activitystreams-test-documents")))
|
||||||
|
|
||||||
|
(-> "resources/activitystreams-test-documents/simple0020.json" slurp clean first :actor)
|
|
@ -57,4 +57,5 @@
|
||||||
private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
private (-> kp .getPrivateKey .getPrivateKeyDataPacket .getEncoded)]
|
||||||
(println (str "Public key: " public))
|
(println (str "Public key: " public))
|
||||||
(println (str "Private key: " private))
|
(println (str "Private key: " private))
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue