Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3359846
D12770.id42327.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
D12770.id42327.diff
View Options
diff --git a/lib/types/tunnelbroker/notif-types.js b/lib/types/tunnelbroker/notif-types.js
--- a/lib/types/tunnelbroker/notif-types.js
+++ b/lib/types/tunnelbroker/notif-types.js
@@ -7,3 +7,11 @@
+deviceID: string,
+payload: string,
};
+
+export type TunnelbrokerFCMNotif = {
+ +type: 'FCMNotif',
+ +clientMessageID: string,
+ +deviceID: string,
+ +data: string,
+ +priority: string,
+};
diff --git a/shared/tunnelbroker_messages/src/messages/mod.rs b/shared/tunnelbroker_messages/src/messages/mod.rs
--- a/shared/tunnelbroker_messages/src/messages/mod.rs
+++ b/shared/tunnelbroker_messages/src/messages/mod.rs
@@ -45,6 +45,7 @@
// This is due to serde's pattern matching behavior where it prioritizes
// the first matching pattern it encounters.
APNsNotif(APNsNotif),
+ FCMNotif(FCMNotif),
MessageToDeviceRequestStatus(MessageToDeviceRequestStatus),
MessageToDeviceRequest(MessageToDeviceRequest),
MessageToDevice(MessageToDevice),
diff --git a/shared/tunnelbroker_messages/src/messages/notif.rs b/shared/tunnelbroker_messages/src/messages/notif.rs
--- a/shared/tunnelbroker_messages/src/messages/notif.rs
+++ b/shared/tunnelbroker_messages/src/messages/notif.rs
@@ -1,7 +1,6 @@
-//! APNs notif built on client.
-
use serde::{Deserialize, Serialize};
+/// APNs notif built on client.
#[derive(Serialize, Deserialize, PartialEq, Debug)]
#[serde(tag = "type", rename_all = "camelCase")]
pub struct APNsNotif {
@@ -12,3 +11,15 @@
pub device_id: String,
pub payload: String,
}
+
+/// FCM notif built on client.
+#[derive(Serialize, Deserialize, PartialEq, Debug)]
+#[serde(tag = "type", rename_all = "camelCase")]
+pub struct FCMNotif {
+ #[serde(rename = "clientMessageID")]
+ pub client_message_id: String,
+ #[serde(rename = "deviceID")]
+ pub device_id: String,
+ pub data: String,
+ pub priority: String,
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 25, 11:19 AM (21 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2579445
Default Alt Text
D12770.id42327.diff (1 KB)
Attached To
Mode
D12770: [Tunnelbroker][lib] add FCM notif message type
Attached
Detach File
Event Timeline
Log In to Comment