From 5ed7d9b53a65aec1f4793f62ac15195c44224b39 Mon Sep 17 00:00:00 2001 From: ConfuSomu Date: Tue, 18 Jul 2023 00:00:20 +0200 Subject: Implement Question object type support This commit adds support for dealing with ActivityPub Questions, which are polls. They are like Notes (posts) but contain a few more keys that record information about the poll options, number of votes and poll closure date. --- src/activitypub/appost.h | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 deletions(-) (limited to 'src/activitypub/appost.h') diff --git a/src/activitypub/appost.h b/src/activitypub/appost.h index a8b99c5..ccbedd9 100644 --- a/src/activitypub/appost.h +++ b/src/activitypub/appost.h @@ -1,28 +1,10 @@ #pragma once #include "apobject.h" -#include "src/activitypub/apbase.h" -#include "src/types.h" +#include "apbase.h" +#include "fields.h" #include -// All these fields (including APAttachmentFields, etc. in other files) are made to map to the fields present in the ActivityStream JSON's "object" for very easy construction. -// There are additional fields that we don't use so they are not included in the objects (including parent and APActivity). - -struct APObjectFields { - QStringList to_actors; // Start APObject - QStringList cc_actors; - QString by_actor; - QString object_url; - QString web_url; - QString reply_to_url; - QString published; - std::vector attachments; // End APObject - QStringList languages; // This is taken from "content_map" - QString content; - QString summary; - StatusType visibility; // status type discovery is better left to the archive/API parser as this can very between fedi implementations and archive formats -}; - // APPost represents an ActivityPub Note Object class APPost : public APObject { public: -- cgit v1.2.3-54-g00ecf