Relationship

public struct Relationship : Codable, Hashable, Identifiable, Sendable
extension Relationship: Equatable

Represents the relationship between accounts, such as following / blocking / muting / etc.

  • Undocumented

    Declaration

    Swift

    public init(id: String,
                following: Bool,
                requested: Bool,
                endorsed: Bool? = nil,
                followedBy: Bool,
                muting: Bool,
                mutingNotifications: Bool? = nil,
                showingReposts: Bool? = nil,
                notifying: Bool? = nil,
                blocking: Bool,
                domainBlocking: Bool?,
                blockedBy: Bool? = nil,
                note: String? = nil)
  • id

    The account id.

    Declaration

    Swift

    public let id: String
  • Are you following this user?

    Declaration

    Swift

    public let following: Bool
  • Do you have a pending follow request for this user?

    Declaration

    Swift

    public let requested: Bool
  • Are you featuring this user on your profile?

    Declaration

    Swift

    public var endorsed: Bool?
  • Are you followed by this user?

    Declaration

    Swift

    public let followedBy: Bool
  • Are you muting this user?

    Declaration

    Swift

    public let muting: Bool
  • Are you muting notifications from this user?

    Declaration

    Swift

    public var mutingNotifications: Bool?
  • Are you receiving this user’s posts in your home timeline?

    Declaration

    Swift

    public var showingReposts: Bool?
  • Have you enabled notifications for this user?

    Declaration

    Swift

    public let notifying: Bool?
  • Are you blocking this user?

    Declaration

    Swift

    public let blocking: Bool
  • Are you blocking this user’s domain?

    Declaration

    Swift

    public let domainBlocking: Bool?
  • Is this user blocking you?

    Declaration

    Swift

    public var blockedBy: Bool?
  • A note to yourself about this user (not the same as the user’s bio, the Mastodon doc is incorrect on this).

    Declaration

    Swift

    public var note: String?
  • Declaration

    Swift

    public static func == (lhs: Relationship, rhs: Relationship) -> Bool