Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,9 @@ pub struct NormalizedUserDetail {
pub is_following: bool,
#[serde(default)]
pub is_followed: bool,
/// 鍵アカウント (フォローに承認が必要) かどうか
#[serde(default)]
pub is_locked: bool,
/// 鍵アカウントへフォローリクエスト送信済みで未承認の状態
#[serde(default)]
pub has_pending_follow_request_from_you: bool,
Expand Down Expand Up @@ -1195,6 +1198,9 @@ pub struct RawUserDetail {
pub is_following: bool,
#[serde(default)]
pub is_followed: bool,
/// 鍵アカウント (フォローに承認が必要) かどうか
#[serde(default)]
pub is_locked: bool,
/// 鍵アカウントへフォローリクエスト送信済みで未承認の状態
#[serde(default)]
pub has_pending_follow_request_from_you: bool,
Expand Down Expand Up @@ -1439,6 +1445,7 @@ impl RawUserDetail {
is_cat: self.is_cat,
is_following: self.is_following,
is_followed: self.is_followed,
is_locked: self.is_locked,
has_pending_follow_request_from_you: self.has_pending_follow_request_from_you,
created_at: self.created_at,
avatar_decorations: self.avatar_decorations,
Expand Down Expand Up @@ -1825,6 +1832,7 @@ mod tests {
"isCat": true,
"isFollowing": false,
"isFollowed": false,
"isLocked": true,
"hasPendingFollowRequestFromYou": true,
"createdAt": "2024-01-01T00:00:00.000Z",
"avatarDecorations": [],
Expand All @@ -1843,6 +1851,7 @@ mod tests {
assert!(detail.is_bot);
assert!(detail.is_cat);
assert!(!detail.is_following);
assert!(detail.is_locked);
assert!(detail.has_pending_follow_request_from_you);
assert_eq!(detail.followers_count, 100);
assert_eq!(detail.notes_count, 200);
Expand Down
Loading