NotificationIdFactory
Factory for creating custom notification IDs based on the ChatNotification type.
Implement this interface to customize how notification IDs are generated for different types of chat notifications. This allows you to control notification grouping behavior.
If getNotificationId returns null, the SDK will use its default notification ID generation logic.
Example usage:
val notificationIdFactory = NotificationIdFactory { notification ->
if (notification is ChatNotification.MessageNew && notification.message.isSystem()) {
// Use a stable hash code for system messages to avoid default grouping by channel
"system:${notification.message.id}".hashCode()
} else {
// Use default SDK behavior for other notification types
null
}
}Content copied to clipboard
Functions
Link copied to clipboard
Generates a notification ID for the given ChatNotification.