mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-29 21:10:20 +02:00
fix(notifications): fix npe
This commit is contained in:
parent
a5a7eed8d3
commit
95012b4232
@ -162,14 +162,14 @@ class Notifications : Feature("Notifications", loadParams = FeatureLoadParams.IN
|
|||||||
|
|
||||||
val extras: Bundle = notificationData.notification.extras.getBundle("system_notification_extras")?: return@hook
|
val extras: Bundle = notificationData.notification.extras.getBundle("system_notification_extras")?: return@hook
|
||||||
|
|
||||||
val messageId = extras.getString("message_id")!!
|
val messageId = extras.getString("message_id") ?: return@hook
|
||||||
val notificationType = extras.getString("notification_type")!!
|
val notificationType = extras.getString("notification_type") ?: return@hook
|
||||||
val conversationId = extras.getString("conversation_id")!!
|
val conversationId = extras.getString("conversation_id") ?: return@hook
|
||||||
|
|
||||||
if (!notificationType.endsWith("CHAT") && !notificationType.endsWith("SNAP")) return@hook
|
if (!notificationType.endsWith("CHAT") && !notificationType.endsWith("SNAP")) return@hook
|
||||||
|
|
||||||
val conversationManager: Any = context.feature(Messaging::class).conversationManager
|
val conversationManager: Any = context.feature(Messaging::class).conversationManager
|
||||||
notificationDataQueue[messageId.toLong()] = notificationData
|
notificationDataQueue[messageId.toLong()] = notificationData
|
||||||
|
|
||||||
val callback = CallbackBuilder(fetchConversationWithMessagesCallback)
|
val callback = CallbackBuilder(fetchConversationWithMessagesCallback)
|
||||||
.override("onFetchConversationWithMessagesComplete") { param ->
|
.override("onFetchConversationWithMessagesComplete") { param ->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user