Display group info in message notifications

Fixes #1033
Fixes #2558
Closes #3020
// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-12-04 15:00:13 -08:00
parent 307578eb18
commit 3b80e35547
3 changed files with 51 additions and 26 deletions

View File

@@ -200,10 +200,12 @@ public class MessageNotifier {
SingleRecipientNotificationBuilder builder = new SingleRecipientNotificationBuilder(context, masterSecret, TextSecurePreferences.getNotificationPrivacy(context));
List<NotificationItem> notifications = notificationState.getNotifications();
Recipients recipients = notifications.get(0).getRecipients();
builder.setSender(notifications.get(0).getIndividualRecipient());
builder.setThread(notifications.get(0).getRecipients());
builder.setMessageCount(notificationState.getMessageCount());
builder.setPrimaryMessageBody(notifications.get(0).getText(), notifications.get(0).getSlideDeck());
builder.setPrimaryMessageBody(recipients, notifications.get(0).getIndividualRecipient(),
notifications.get(0).getText(), notifications.get(0).getSlideDeck());
builder.setContentIntent(notifications.get(0).getPendingIntent(context));
long timestamp = notifications.get(0).getTimestamp();
@@ -217,8 +219,8 @@ public class MessageNotifier {
ListIterator<NotificationItem> iterator = notifications.listIterator(notifications.size());
while(iterator.hasPrevious()) {
builder.addMessageBody(iterator.previous().getText());
NotificationItem item = iterator.previous();
builder.addMessageBody(item.getRecipients(), item.getIndividualRecipient(), item.getText());
}
if (signal) {