Skip to content

Commit

Permalink
chore(notifications): ensure proper formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thevaibhav-dixit committed Feb 12, 2024
1 parent 0b2dff5 commit e332459
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/notifications/src/notification_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ pub struct CircleGrew {
pub this_month_circle_size: u32,
pub all_time_circle_size: u32,
}

impl NotificationEvent for CircleGrew {
fn user_id(&self) -> &GaloyUserId {
&self.user_id
Expand All @@ -83,6 +84,7 @@ impl NotificationEvent for CircleGrew {
Messages::circle_grew(locale.as_ref(), self)
}
}

impl From<CircleGrew> for NotificationEventPayload {
fn from(event: CircleGrew) -> Self {
NotificationEventPayload::CircleGrew(event)
Expand Down Expand Up @@ -110,6 +112,7 @@ impl NotificationEvent for CircleThresholdReached {
Messages::circle_threshold_reached(locale.as_ref(), self)
}
}

impl From<CircleThresholdReached> for NotificationEventPayload {
fn from(event: CircleThresholdReached) -> Self {
NotificationEventPayload::CircleThresholdReached(event)
Expand All @@ -134,6 +137,7 @@ impl NotificationEvent for DocumentsSubmitted {
Messages::documents_submitted(locale.as_ref(), self)
}
}

impl From<DocumentsSubmitted> for NotificationEventPayload {
fn from(event: DocumentsSubmitted) -> Self {
NotificationEventPayload::DocumentsSubmitted(event)
Expand All @@ -158,6 +162,7 @@ impl NotificationEvent for DocumentsApproved {
Messages::documents_approved(locale.as_ref(), self)
}
}

impl From<DocumentsApproved> for NotificationEventPayload {
fn from(event: DocumentsApproved) -> Self {
NotificationEventPayload::DocumentsApproved(event)
Expand All @@ -182,6 +187,7 @@ impl NotificationEvent for DocumentsRejected {
Messages::documents_rejected(locale.as_ref(), self)
}
}

impl From<DocumentsRejected> for NotificationEventPayload {
fn from(event: DocumentsRejected) -> Self {
NotificationEventPayload::DocumentsRejected(event)
Expand Down

0 comments on commit e332459

Please sign in to comment.