Skip to content

Commit 4c95f5a

Browse files
committed
fix: bug with notification body
1 parent 4f847b1 commit 4c95f5a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

androidApp/src/main/java/ru/aleshin/studyassistant/presentation/services/RemoteMessageHandlerImpl.kt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ class RemoteMessageHandlerImpl(private val context: Context) : RemoteMessageHand
7474

7575
NotifyPushContentType.ACCEPT_FRIEND_REQUEST -> showNotification(
7676
title = buildString {
77-
val senderName =
78-
message.data[NotifyPushContent.AcceptFriendRequest.SENDER_NAME]
77+
val senderName = message.data[NotifyPushContent.AcceptFriendRequest.SENDER_NAME]
7978
append(senderName ?: coreStrings.emptyMessageUser, " ")
8079
append(coreStrings.acceptFriendRequestMessageTitleSuffix)
8180
},
@@ -84,8 +83,7 @@ class RemoteMessageHandlerImpl(private val context: Context) : RemoteMessageHand
8483

8584
NotifyPushContentType.REJECT_FRIEND_REQUEST -> showNotification(
8685
title = buildString {
87-
val senderName =
88-
message.data[NotifyPushContent.RejectFriendRequest.SENDER_NAME]
86+
val senderName = message.data[NotifyPushContent.RejectFriendRequest.SENDER_NAME]
8987
append(senderName ?: coreStrings.emptyMessageUser, " ")
9088
append(coreStrings.rejectFriendRequestMessageTitleSuffix)
9189
},
@@ -99,7 +97,7 @@ class RemoteMessageHandlerImpl(private val context: Context) : RemoteMessageHand
9997
append(coreStrings.shareHomeworkMessageTitleSuffix)
10098
},
10199
body = buildString {
102-
val subjects = message.data[NotifyPushContent.ShareHomework.SENDER_NAME]
100+
val subjects = message.data[NotifyPushContent.ShareHomework.SUBJECT_NAMES]
103101
append(coreStrings.shareHomeworkMessageBody)
104102
append(subjects ?: coreStrings.noneTitle)
105103
},

0 commit comments

Comments
 (0)