@@ -840,7 +840,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
840840 )
841841 }
842842 val personBuilder = Person .Builder ()
843- .setKey(signatureVerification. user!! .id.toString() + " @" + notificationUser.id)
843+ .setKey(user.id.toString() + " @" + notificationUser.id)
844844 .setName(EmojiCompat .get().process(notificationUser.name!! ))
845845 .setBot(" bot" == userType)
846846
@@ -850,8 +850,8 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
850850 }
851851
852852 val deviceUser = Person .Builder ()
853- .setKey(signatureVerification. user!! .id.toString() + " @" + signatureVerification. user!! .userId)
854- .setName(signatureVerification. user!! .displayName ? : signatureVerification. user!! .userId ? : " You" )
853+ .setKey(user.id.toString() + " @" + user.userId)
854+ .setName(user.displayName ? : user.userId ? : " You" )
855855 .build()
856856
857857 val sender = personBuilder.build()
@@ -884,7 +884,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
884884 val userType = notificationUser?.type
885885 if (userType != " user" && userType != " guest" ) return null
886886
887- val baseUrl = signatureVerification. user!! .baseUrl
887+ val baseUrl = user.baseUrl
888888 val avatarUrl = if (" user" == userType) {
889889 ApiUtils .getUrlForAvatar(
890890 baseUrl!! ,
@@ -913,14 +913,14 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
913913 return bitmap
914914 }
915915
916- private fun pushConversationShortcut (notificationBuilder : NotificationCompat .Builder ) {
916+ private fun pushConversationShortcut (notificationBuilder : NotificationCompat .Builder , avatarBitmap : Bitmap ? ) {
917917 val notificationUser = pushMessage.notificationUser ? : return
918918 val roomToken = pushMessage.id ? : return
919919
920- val shortcutId = " conversation_${signatureVerification. user!! .id} _$roomToken "
920+ val shortcutId = " conversation_${user.id} _$roomToken "
921921
922922 val personBuilder = Person .Builder ()
923- .setKey(signatureVerification. user!! .id.toString() + " @" + notificationUser.id)
923+ .setKey(user.id.toString() + " @" + notificationUser.id)
924924 .setName(EmojiCompat .get().process(notificationUser.name!! ))
925925
926926 if (avatarBitmap != null ) {
@@ -930,7 +930,7 @@ class NotificationWorker(context: Context, workerParams: WorkerParameters) : Wor
930930 val intent = Intent (context, MainActivity ::class .java).apply {
931931 action = Intent .ACTION_VIEW
932932 putExtra(KEY_ROOM_TOKEN , roomToken)
933- putExtra(KEY_INTERNAL_USER_ID , signatureVerification. user!! .id)
933+ putExtra(KEY_INTERNAL_USER_ID , user.id)
934934 }
935935
936936 val shortcut = ShortcutInfoCompat .Builder (context!! , shortcutId)
0 commit comments