Add MarkSeen Functionality to Notification System
- Implemented the MarkSeen method in the notification client to mark notifications as seen, enhancing user interaction with notifications. - Added MarkSeenRequest and MarkSeenResponse structs to facilitate the request and response handling for marking notifications. - Updated the NotificationService interface to include the new MarkSeen method, ensuring consistency across the service layer. - Enhanced the SDK with a QuickMarkSeen convenience method for easier usage in client applications. - Included logging for successful and failed attempts to mark notifications as seen, improving traceability and debugging capabilities.
This commit is contained in:
@@ -109,6 +109,11 @@ func (s *Service) GetNotifications(ctx context.Context, req *GetNotificationsReq
|
||||
return s.client.GetNotifications(ctx, req)
|
||||
}
|
||||
|
||||
// MarkSeen marks a notification as seen
|
||||
func (s *Service) MarkSeen(ctx context.Context, notificationID string) (*MarkSeenResponse, error) {
|
||||
return s.client.MarkSeen(ctx, notificationID)
|
||||
}
|
||||
|
||||
// Health checks if the notification service is available
|
||||
func (s *Service) Health(ctx context.Context) error {
|
||||
// Create a simple test request to check service availability
|
||||
|
||||
Reference in New Issue
Block a user