mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-06-01 08:38:05 +00:00
6f513793cb
* update activitypub-federation crate to 0.4.0 * fixes * apub compiles! * everything compiling! * almost done, federated follow failing * some test fixes * use release * add code back in
20 lines
657 B
Rust
20 lines
657 B
Rust
use crate::{
|
|
objects::person::ApubPerson,
|
|
protocol::{activities::CreateOrUpdateType, objects::chat_message::ChatMessage},
|
|
};
|
|
use activitypub_federation::{fetch::object_id::ObjectId, protocol::helpers::deserialize_one};
|
|
use serde::{Deserialize, Serialize};
|
|
use url::Url;
|
|
|
|
#[derive(Clone, Debug, Deserialize, Serialize)]
|
|
#[serde(rename_all = "camelCase")]
|
|
pub struct CreateOrUpdateChatMessage {
|
|
pub(crate) id: Url,
|
|
pub(crate) actor: ObjectId<ApubPerson>,
|
|
#[serde(deserialize_with = "deserialize_one")]
|
|
pub(crate) to: [ObjectId<ApubPerson>; 1],
|
|
pub(crate) object: ChatMessage,
|
|
#[serde(rename = "type")]
|
|
pub(crate) kind: CreateOrUpdateType,
|
|
}
|