Skip to content

Commit 11a6691

Browse files
committed
refactor: update sender name retrieval logic in push notifications for improved clarity
1 parent 93d1165 commit 11a6691

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
@@ -469,7 +469,7 @@ private void notificationStyle(Notification.Builder notification, int notId, Bun
469469

470470
String displaySenderName = (ejson != null && ejson.senderName != null && !ejson.senderName.isEmpty())
471471
? ejson.senderName
472-
: (ejson != null && ejson.sender != null ? ejson.sender.name : "Unknown");
472+
: (ejson != null && ejson.sender != null ? ejson.sender.username : title);
473473

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

0 commit comments

Comments
 (0)