Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F2898205
D12634.id41873.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D12634.id41873.diff
View Options
diff --git a/keyserver/src/push/send.js b/keyserver/src/push/send.js
--- a/keyserver/src/push/send.js
+++ b/keyserver/src/push/send.js
@@ -375,6 +375,7 @@
newRawMessageInfos: shimmedNewRawMessageInfos,
threadID: threadInfo.id,
collapseKey: notifInfo.collapseKey,
+ badgeOnly,
unreadCount,
platformDetails,
dbID,
@@ -905,6 +906,7 @@
+newRawMessageInfos: RawMessageInfo[],
+threadID: string,
+collapseKey: ?string,
+ +badgeOnly: boolean,
+unreadCount: number,
+platformDetails: PlatformDetails,
};
@@ -915,27 +917,18 @@
newRawMessageInfos: t.list(rawMessageInfoValidator),
threadID: tID,
collapseKey: t.maybe(t.String),
+ badgeOnly: t.Boolean,
unreadCount: t.Number,
platformDetails: tPlatformDetails,
});
-type APNsNotifInputData = {
- ...CommonNativeNotifInputData,
- +badgeOnly: boolean,
-};
-
-const apnsNotifInputDataValidator = tShape<APNsNotifInputData>({
- ...commonNativeNotifInputDataValidator.meta.props,
- badgeOnly: t.Boolean,
-});
-
async function prepareAPNsNotification(
- inputData: APNsNotifInputData,
+ inputData: CommonNativeNotifInputData,
devices: $ReadOnlyArray<NotificationTargetDevice>,
): Promise<$ReadOnlyArray<TargetedAPNsNotification>> {
const convertedData = await validateOutput(
inputData.platformDetails,
- apnsNotifInputDataValidator,
+ commonNativeNotifInputDataValidator,
inputData,
);
const {
@@ -1183,6 +1176,7 @@
newRawMessageInfos,
threadID,
collapseKey,
+ badgeOnly,
unreadCount,
platformDetails,
dbID,
@@ -1231,7 +1225,7 @@
notification.data = {
...notification.data,
id: notifID,
- badgeOnly: '0',
+ badgeOnly: badgeOnly ? '1' : '0',
};
const messageInfos = JSON.stringify(newRawMessageInfos);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Oct 6, 2:27 AM (20 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2246988
Default Alt Text
D12634.id41873.diff (1 KB)
Attached To
Mode
D12634: Bring badgeOnly property to Android notifs
Attached
Detach File
Event Timeline
Log In to Comment