From 71fa674ce3069c5fdce812980800b30398913710 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann <10477760+JadedCtrl@users.noreply.github.com> Date: Mon, 21 Oct 2024 04:20:54 -0500 Subject: [PATCH] Use LitePub for user-class in example server Now that LitePub has its own classes (rather than modifying those of Activity-Vocabulary), this is necessary. --- docs/examples/simple-server.lisp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/examples/simple-server.lisp b/docs/examples/simple-server.lisp index 050c213..975352a 100644 --- a/docs/examples/simple-server.lisp +++ b/docs/examples/simple-server.lisp @@ -16,7 +16,8 @@ (:export :start-server :seed) ;; Note that we use a nickname for the ActivityStreams vocab! ;; I recommend doing likewise; save yourself some typing! - (:local-nicknames (:as :activity-servist/vocab/activity))) + (:local-nicknames (:ass :activity-servist/vocab/activity) + (:lp :activity-servist/vocab/litepub))) (in-package #:activitypub-example) @@ -115,7 +116,7 @@ Otherwise, assume “https”." ;;; Users ;;; ———————————————————————————————————————— -(defclass user (as:person) +(defclass user (ass:person lp:object) ((inbox :accessor user-inbox :initform nil @@ -141,10 +142,10 @@ The ID and ENDPOINTS are derived using the parameter USERNAME and the global *US (getf *config* :host) username))) (flet ((sub-uri (path) (format nil "~A/~A" uri path))) - (setf (as:name obj) username) + (setf (ass:name obj) username) (setf (json-ld:@id obj) uri) - (setf (as:inbox obj) (sub-uri "inbox")) - (setf (as:outbox obj) (sub-uri "outbox")) - (setf (as:following obj) (sub-uri "following")) - (setf (as:followers obj) (sub-uri "followers"))) + (setf (ass:inbox obj) (sub-uri "inbox")) + (setf (ass:outbox obj) (sub-uri "outbox")) + (setf (ass:following obj) (sub-uri "following")) + (setf (ass:followers obj) (sub-uri "followers"))) obj))