☰ Docs menu · Conversation notifications
Conversation notifications
Show chat messages like a messenger does: the sender's photo, one notification per conversation, and on Android the chat in the phone's Conversations section. Add a few keys to the message data; the SDKs do the rest.
A normal push shows your app's icon, and every message is its own notification. For a chat, people expect the sender's face and the messages of one conversation together, as in the big messengers. Add a conversationId (and the sender) to the message data and the Abrova Push SDKs show it that way. Messages without conversationId look exactly as before.
Step 1: Add the conversation to the message data#
| Key in data | What it does |
|---|---|
| conversationId | Required. One conversation per id, for example your chat or room id. New messages with the same id join the same notification. |
| senderName | Who wrote the message. Without it, the title is used. |
| senderId | Tells two senders with the same name apart. |
| senderAvatarUrl | An https image for the sender’s photo. Without it, Android draws a round letter. |
| conversationTitle | The group’s name, shown for groups. |
| conversationIsGroup | true for a group conversation. |
From your server:
curl -X POST https://push-api.abrova.ir/push/send-to-user \
-H "x-api-key: $ABROVA_API_KEY" \
-H "x-server-secret: $ABROVA_SERVER_SECRET" \
-H "content-type: application/json" \
-d '{"userId":"user_kian","title":"@ali","body":"Is the bike still available?",
"data":{"conversationId":"room_42","senderName":"@ali","senderId":"user_ali",
"senderAvatarUrl":"https://cdn.example.com/avatars/ali.jpg"}}'With the Node.js SDK, conversationData() builds the keys:
import { AbrovaPush, conversationData } from '@abrova/push-node';
await push.send({
userId: 'user_kian',
title: '@ali',
body: 'Is the bike still available?',
data: {
...conversationData({ id: 'room_42', senderName: '@ali', senderId: 'user_ali', senderAvatarUrl: 'https://cdn.example.com/avatars/ali.jpg' }),
roomId: 'room_42',
},
});For a group, add isGroup: true and title: 'Family' (or the keys conversationIsGroup and conversationTitle).
Chat already sends conversationId, senderName, senderId and, for groups, the group's name with every message push. Only the photo is yours, because Chat stores no pictures: put senderAvatarUrl in the message's metadata.pushData when you send it. See Chat push notifications.
Step 2: iOS: two setup steps#
Android, the web and Flutter on Android need nothing more. On iOS the sender's photo is a communication notification, which Apple only allows when the app asks for it:
- In Xcode, select your app target and add the Communication Notifications capability. In the app's
Info.plist, addNSUserActivityTypeswith the itemINSendMessageIntent. - In your Notification Service Extension (the one with
pod 'AbrovaPushSDKExtension', see iOS SDK), pass the content through the SDK:
override func didReceive(_ request: UNNotificationRequest,
withContentHandler contentHandler: @escaping (UNNotificationContent) -> Void) {
AbrovaPushServiceExtension.conversationContent(for: request) { contentHandler($0) }
}If you also confirm deliveries there, call AbrovaPushServiceExtension.didReceive(request, apiKey:appGroup:) first. Flutter and React Native apps do the same in their iOS project.
Without step 1, iOS still groups the conversation's messages together, without the photo.
Step 3: What people see#
- Android: the sender's round photo instead of the app icon, the conversation's messages stacked in one notification, and the group name for groups. On Android 11 and later the chat sits in the Conversations section at the top of the notification list, and on Samsung's small pop-up style it shows the sender's face. Tapping it opens your app with the message data, as before.
- iOS 15 and later: the sender's photo and name on the notification, and the conversation's notifications grouped together.
- Web: one notification per conversation. A new message replaces it and keeps the earlier lines (up to 5), with the sender's photo as the icon. A group shows its name and
sender: textlines.
Conversation notifications need Android SDK 0.1.22, iOS SDK 0.1.21, Flutter 0.1.31, React Native 0.1.22 or Web 0.1.15 (conversationData() is in Node.js 0.1.9). Older SDKs ignore the keys and show the message as a normal notification.
Last updated: 15 Nov 2026