Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3386445
D12895.id42833.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
D12895.id42833.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
@@ -15,3 +15,15 @@
+data: string,
+priority: 'NORMAL' | 'HIGH',
};
+
+export type TunnelbrokerWebPushNotif = {
+ +type: 'WebPushNotif',
+ +clientMessageID: string,
+ +deviceID: string,
+ +payload: string,
+};
+
+export type TunnelbrokerNotif =
+ | TunnelbrokerAPNsNotif
+ | TunnelbrokerFCMNotif
+ | TunnelbrokerWebPushNotif;
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
@@ -43,6 +43,7 @@
AnonymousInitializationMessage(AnonymousInitializationMessage),
APNsNotif(APNsNotif),
FCMNotif(FCMNotif),
+ WebPushNotif(WebPushNotif),
MessageToDeviceRequest(MessageToDeviceRequest),
MessageReceiveConfirmation(MessageReceiveConfirmation),
MessageToTunnelbrokerRequest(MessageToTunnelbrokerRequest),
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
@@ -23,3 +23,14 @@
pub data: String,
pub priority: String,
}
+
+/// WebPush notif built on client.
+#[derive(Serialize, Deserialize, PartialEq, Debug)]
+#[serde(tag = "type", rename_all = "camelCase")]
+pub struct WebPushNotif {
+ #[serde(rename = "clientMessageID")]
+ pub client_message_id: String,
+ #[serde(rename = "deviceID")]
+ pub device_id: String,
+ pub payload: String,
+}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 30, 4:47 AM (19 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2599608
Default Alt Text
D12895.id42833.diff (1 KB)
Attached To
Mode
D12895: [tunnelbroker][lib] Add WebPush notif message type
Attached
Detach File
Event Timeline
Log In to Comment