lemmy/crates/apub/src/protocol/activities/voting/undo_vote.rs

26 lines
734 B
Rust
Raw Normal View History

use crate::{
objects::person::ApubPerson,
protocol::{activities::voting::vote::Vote, Unparsed},
};
use activitystreams_kinds::activity::UndoType;
2021-11-05 00:24:10 +00:00
use lemmy_apub_lib::object_id::ObjectId;
use serde::{Deserialize, Serialize};
use url::Url;
#[derive(Clone, Debug, Deserialize, Serialize)]
#[serde(rename_all = "camelCase")]
pub struct UndoVote {
pub(crate) actor: ObjectId<ApubPerson>,
#[serde(deserialize_with = "crate::deserialize_one_or_many")]
pub(crate) to: Vec<Url>,
pub(crate) object: Vote,
#[serde(deserialize_with = "crate::deserialize_one_or_many")]
pub(crate) cc: Vec<Url>,
#[serde(rename = "type")]
pub(crate) kind: UndoType,
pub(crate) id: Url,
#[serde(flatten)]
pub(crate) unparsed: Unparsed,
}