Skip to content

Enhancement: Add event-specific information to notifications #79

@coderabbitai

Description

@coderabbitai

Feature Enhancement: Improve Notification Content

Description

Currently, notifications show generic text without context about the specific event type. This enhancement would make notifications more informative by including event-specific details.

Suggested Implementation

Modify the showLocalNotification method in lib/notifications/notification_service.dart to:

  1. Extract and display relevant information from the NostrEvent:
-    'New Mostro Event',
-    'You have received a new message from Mostro',
+    'New Mostro ${event.kind == 1059 ? "Message" : "Event"}',
+    'You have received a ${event.kind == 1059 ? "new message" : "notification"} related to ${event.orderId ?? "your account"}',
  1. Add payload data to enable deep linking:
     details,
+    payload: {'orderId': event.orderId, 'eventId': event.id},

References

Benefits

  • More informative notifications for users
  • Better context for different event types
  • Support for deep linking when notification is tapped

This feature is planned for a future release after the current implementation is stabilized.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions