Skip to content

Commit 2dbe2fb

Browse files
committed
refactor: update sender name retrieval logic in push notifications for improved clarity
1 parent 07dde62 commit 2dbe2fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

android/app/src/main/java/chat/rocket/reactnative/notification/CustomPushNotification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ private void notificationStyle(Notification.Builder notification, int notId, Bun
550550

551551
String displaySenderName = (ejson != null && ejson.senderName != null && !ejson.senderName.isEmpty())
552552
? ejson.senderName
553-
: (ejson != null && ejson.sender != null ? ejson.sender.name : "Unknown");
553+
: (ejson != null && ejson.sender != null ? ejson.sender.username : title);
554554

555555
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.P) {
556556
messageStyle.addMessage(m, timestamp, displaySenderName);

0 commit comments

Comments
 (0)