atrium_api/chat/bsky/group/
enable_join_link.rs1pub const NSID: &str = "chat.bsky.group.enableJoinLink";
4#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
5#[serde(rename_all = "camelCase")]
6pub struct InputData {
7 pub convo_id: String,
8}
9pub type Input = crate::types::Object<InputData>;
10#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
11#[serde(rename_all = "camelCase")]
12pub struct OutputData {
13 pub join_link: crate::chat::bsky::group::defs::JoinLinkView,
14}
15pub type Output = crate::types::Object<OutputData>;
16#[derive(serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq)]
17#[serde(tag = "error", content = "message")]
18pub enum Error {
19 InvalidConvo(Option<String>),
20 InsufficientRole(Option<String>),
21 NoJoinLink(Option<String>),
22 LinkAlreadyEnabled(Option<String>),
23}
24impl std::fmt::Display for Error {
25 fn fmt(&self, _f: &mut std::fmt::Formatter) -> std::fmt::Result {
26 match self {
27 Error::InvalidConvo(msg) => {
28 write!(_f, "InvalidConvo")?;
29 if let Some(msg) = msg {
30 write!(_f, ": {msg}")?;
31 }
32 }
33 Error::InsufficientRole(msg) => {
34 write!(_f, "InsufficientRole")?;
35 if let Some(msg) = msg {
36 write!(_f, ": {msg}")?;
37 }
38 }
39 Error::NoJoinLink(msg) => {
40 write!(_f, "NoJoinLink")?;
41 if let Some(msg) = msg {
42 write!(_f, ": {msg}")?;
43 }
44 }
45 Error::LinkAlreadyEnabled(msg) => {
46 write!(_f, "LinkAlreadyEnabled")?;
47 if let Some(msg) = msg {
48 write!(_f, ": {msg}")?;
49 }
50 }
51 }
52 Ok(())
53 }
54}