forked from Ivasoft/mattermost-mobile
Notification receipt delivery for Android and iOS (#2755)
* Notification receipt delivery for Android and iOS * Update Fastlane with iOS notification service extension * User JSONObject to build response
This commit is contained in:
@@ -94,7 +94,13 @@ public class CustomPushNotification extends PushNotification {
|
||||
Bundle data = mNotificationProps.asBundle();
|
||||
final String channelId = data.getString("channel_id");
|
||||
final String type = data.getString("type");
|
||||
final String ackId = data.getString("ack_id");
|
||||
int notificationId = MESSAGE_NOTIFICATION_ID;
|
||||
|
||||
if (ackId != null) {
|
||||
notificationReceiptDelivery(ackId, type);
|
||||
}
|
||||
|
||||
if (channelId != null) {
|
||||
notificationId = channelId.hashCode();
|
||||
Object objCount = channelIdToNotificationCount.get(channelId);
|
||||
@@ -379,4 +385,8 @@ public class CustomPushNotification extends PushNotification {
|
||||
String sender = String.format("%s: ", getSenderName(senderName, channelName, message));
|
||||
return message.replaceFirst(sender, "");
|
||||
}
|
||||
|
||||
private void notificationReceiptDelivery(String ackId, String type) {
|
||||
ReceiptDelivery.send(context, ackId, type);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user