Skip to content

Commit

Permalink
Add Status as a Pleroma NotificationType
Browse files Browse the repository at this point in the history
  • Loading branch information
h3poteto committed Sep 30, 2024
1 parent 35c95df commit b795378
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/pleroma/entities/notification.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ pub enum NotificationType {
PleromaEmojiReaction,
Update,
Move,
Status,
}

impl fmt::Display for NotificationType {
Expand All @@ -59,6 +60,7 @@ impl fmt::Display for NotificationType {
NotificationType::FollowRequest => write!(f, "follow_request"),
NotificationType::Update => write!(f, "update"),
NotificationType::Move => write!(f, "move"),
NotificationType::Status => write!(f, "status"),
}
}
}
Expand All @@ -77,6 +79,7 @@ impl FromStr for NotificationType {
"follow_request" => Ok(NotificationType::FollowRequest),
"update" => Ok(NotificationType::Update),
"move" => Ok(NotificationType::Move),
"status" => Ok(NotificationType::Status),
_ => Err(Error::new_own(s.to_owned(), Kind::ParseError, None, None)),
}
}
Expand Down Expand Up @@ -124,6 +127,7 @@ impl From<NotificationType> for MegalodonEntities::notification::NotificationTyp
}
NotificationType::Update => MegalodonEntities::notification::NotificationType::Update,
NotificationType::Move => MegalodonEntities::notification::NotificationType::Move,
NotificationType::Status => MegalodonEntities::notification::NotificationType::Status,
}
}
}
Expand Down

0 comments on commit b795378

Please sign in to comment.