diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-08-26 13:35:01 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-08-26 22:40:27 +0200 |
commit | 634f461c847d5103a122b5009fe924e652e95495 (patch) | |
tree | 0893c27e0ba27aa676293de2c4d47ad0a6473075 /src/main/java/de/pixart/messenger/services/NotificationService.java | |
parent | 019dd0a23dd53c5760fda0c88a094c34ad946357 (diff) |
attach contact to notification
Diffstat (limited to 'src/main/java/de/pixart/messenger/services/NotificationService.java')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/NotificationService.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java index 34496a3c2..92876205c 100644 --- a/src/main/java/de/pixart/messenger/services/NotificationService.java +++ b/src/main/java/de/pixart/messenger/services/NotificationService.java @@ -36,6 +36,7 @@ import java.util.regex.Pattern; import de.pixart.messenger.Config; import de.pixart.messenger.R; import de.pixart.messenger.entities.Account; +import de.pixart.messenger.entities.Contact; import de.pixart.messenger.entities.Conversation; import de.pixart.messenger.entities.Message; import de.pixart.messenger.ui.ConversationActivity; @@ -329,6 +330,13 @@ public class NotificationService { createShowLocationIntent(message)); } } + if (conversation.getMode() == Conversation.MODE_SINGLE) { + Contact contact = conversation.getContact(); + Uri systemAccount = contact.getSystemAccount(); + if (systemAccount != null) { + mBuilder.addPerson(systemAccount.toString()); + } + } mBuilder.setWhen(conversation.getLatestMessage().getTimeSent()); mBuilder.setSmallIcon(R.drawable.ic_notification); mBuilder.setDeleteIntent(createDeleteIntent(conversation)); |