2 objects::person::ApubPerson,
3 protocol::{objects::group::Group, Unparsed},
5 use activitypub_federation::{core::object_id::ObjectId, deser::helpers::deserialize_one_or_many};
6 use activitystreams_kinds::activity::UpdateType;
7 use serde::{Deserialize, Serialize};
10 /// This activity is received from a remote community mod, and updates the description or other
11 /// fields of a local community.
12 #[derive(Clone, Debug, Deserialize, Serialize)]
13 #[serde(rename_all = "camelCase")]
14 pub struct UpdateCommunity {
15 pub(crate) actor: ObjectId<ApubPerson>,
16 #[serde(deserialize_with = "deserialize_one_or_many")]
17 pub(crate) to: Vec<Url>,
18 // TODO: would be nice to use a separate struct here, which only contains the fields updated here
19 pub(crate) object: Box<Group>,
20 #[serde(deserialize_with = "deserialize_one_or_many")]
21 pub(crate) cc: Vec<Url>,
22 #[serde(rename = "type")]
23 pub(crate) kind: UpdateType,
27 pub(crate) unparsed: Unparsed,