feat(ap): @mention notification from inbound remote Notes

This commit is contained in:
2026-05-15 05:44:10 +02:00
parent ca1ebc4b68
commit 6c83c193ed
6 changed files with 138 additions and 1 deletions

View File

@@ -112,6 +112,23 @@ impl NotificationEventService {
})
.await
}
DomainEvent::MentionReceived {
thought_id,
mentioned_user_id,
author_user_id,
} => {
self.notifications
.save(&Notification {
id: NotificationId::new(),
user_id: mentioned_user_id.clone(),
notification_type: NotificationType::Mention,
from_user_id: Some(author_user_id.clone()),
thought_id: Some(thought_id.clone()),
read: false,
created_at: Utc::now(),
})
.await
}
_ => Ok(()),
}
}