Skip to content

Commit

Permalink
fix: NotificationService message data 키 수정 (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
easyhz committed Aug 30, 2024
1 parent a117809 commit 50da89b
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ class NotificationService
private val notificationManager = context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager

fun showNotification(message: RemoteMessage) {
val title = message.data["title"]
val body = message.data["body"]
val announcementId = message.data["announcementId"]?.toIntOrNull()
val organizationId = message.data["organizationId"]?.toIntOrNull()
val messageData = message.data
val title = messageData["title"]
val body = messageData["content"]
val announcementId = messageData["announcementId"]?.toIntOrNull()
val organizationId = messageData["organizationId"]?.toIntOrNull()

val pendingIntent = setIntent(announcementId = announcementId, organizationId = organizationId)
val notification = NotificationCompat.Builder(context, context.getString(CHANNEL_ID))
Expand Down

0 comments on commit 50da89b

Please sign in to comment.