fix(notifications): fix npe

This commit is contained in:
rhunk 2023-05-18 16:11:11 +02:00
parent a5a7eed8d3
commit 95012b4232

View File

@ -162,9 +162,9 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN
val extras: Bundle = notificationData.notification.extras.getBundle("system_notification_extras")?: return@hook
val messageId = extras.getString("message_id")!!
val notificationType = extras.getString("notification_type")!!
val conversationId = extras.getString("conversation_id")!!
val messageId = extras.getString("message_id") ?: return@hook
val notificationType = extras.getString("notification_type") ?: return@hook
val conversationId = extras.getString("conversation_id") ?: return@hook
if (!notificationType.endsWith("CHAT") && !notificationType.endsWith("SNAP")) return@hook