-
public interface NotificationIdFactoryFactory 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 } }
-
-
Method Summary
Modifier and Type Method Description abstract IntegergetNotificationId(ChatNotification notification)Generates a notification ID for the given ChatNotification. -
-
Method Detail
-
getNotificationId
abstract Integer getNotificationId(ChatNotification notification)
Generates a notification ID for the given ChatNotification.
- Parameters:
notification- The chat notification to generate an ID for.
-
-
-
-