#pragma once #include "apobject.h" #include "src/activitypub/apbase.h" #include "src/types.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: APPost(); // A post that will be built from strings, including attachments APPost(APObjectFields fields); ~APPost() {}; QString get_html_render(HtmlRenderDetails render_info); protected: bool is_sensitive = false; QString summary; // content warning QStringList languages; QString content; QString get_html_status_languages(); };