summaryrefslogtreecommitdiffstats
path: root/src/entities/relationship.rs
blob: df3fa51e1c3fd6c88884af5d88ed2f25c41da1a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! module containing everything relating to a relationship with
//! another account.
use serde::Deserialize;

/// A struct containing information about a relationship with another account.
#[derive(Debug, Clone, Deserialize, PartialEq)]
pub struct Relationship {
    /// Target account id
    pub id: String,
    /// Whether the application client follows the account.
    pub following: bool,
    /// Whether the account follows the application client.
    pub followed_by: bool,
    /// Whether the application client blocks the account.
    pub blocking: bool,
    /// Whether the application client blocks the account.
    pub muting: bool,
    /// Whether the application client has requested to follow the account.
    pub requested: bool,
    /// Whether the user is also muting notifications
    pub muting_notifications: bool,
    /// Whether the user is currently blocking the accounts's domain
    pub domain_blocking: bool,
    /// Whether the user's reblogs will show up in the home timeline
    pub showing_reblogs: bool,
    /// Whether the user is currently endorsing the account
    ///
    /// This field is not techincally nullable with mastodon >= 2.5.0, but
    /// making it `Option<bool>` here means we shouldn't get deser errors when
    /// making calls to pleroma or mastodon<2.5.0 instances
    pub endorsed: Option<bool>,
}