Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression where Android push conversation title doesn't display #36421

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,13 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil
return;
}

Log.i(TAG, "julessss -- ");
Log.i(TAG, "julessss -- payload: " + payload);

// Retrieve and check for existing notifications
StatusBarNotification existingReportNotification = getActiveNotificationByReportId(context, reportID);
boolean hasExistingNotification = existingReportNotification != null;
boolean hasExistingNotification = existingReportNotification != null; // BOOL BROKE THE CONDITION?
Log.i(TAG, "julessss -- hasExistingNotification: " + hasExistingNotification);
try {
JsonMap reportMap = payload.get(ONYX_DATA_KEY).getList().get(1).getMap().get("value").getMap();
String reportId = reportMap.keySet().iterator().next();
Expand All @@ -192,6 +196,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil
// Use the formatted alert message from the backend. Otherwise fallback on the message in the Onyx data.
String message = alert != null ? alert : messageData.get("message").getList().get(0).getMap().get("text").getString();
String conversationName = payload.get("roomName") == null ? "" : payload.get("roomName").getString("");
Log.i(TAG, "julessss -- conversationName: " + conversationName);

// create the Person object who sent the latest report comment
Bitmap personIcon = fetchIcon(context, avatar);
Expand All @@ -205,6 +210,7 @@ private void applyMessageStyle(@NonNull Context context, NotificationCompat.Buil

// Conversational styling should be applied to groups chats, rooms, and any 1:1 chats with more than one notification (ensuring the large profile image is always shown)
if (!conversationName.isEmpty() || hasExistingNotification) {
Log.i(TAG, "julessss -- Conversational styling should be applied");
// Create the messaging style notification builder for this notification, associating it with the person who sent the report comment
NotificationCompat.MessagingStyle messagingStyle = new NotificationCompat.MessagingStyle(person)
.setGroupConversation(true)
Expand Down
Loading