Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3332796
D12897.id42853.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D12897.id42853.diff
View Options
diff --git a/lib/tunnelbroker/tunnelbroker-context.js b/lib/tunnelbroker/tunnelbroker-context.js
--- a/lib/tunnelbroker/tunnelbroker-context.js
+++ b/lib/tunnelbroker/tunnelbroker-context.js
@@ -22,10 +22,7 @@
type TunnelbrokerToDeviceMessage,
type DeviceToTunnelbrokerRequest,
} from '../types/tunnelbroker/messages.js';
-import type {
- TunnelbrokerAPNsNotif,
- TunnelbrokerFCMNotif,
-} from '../types/tunnelbroker/notif-types.js';
+import type { TunnelbrokerNotif } from '../types/tunnelbroker/notif-types.js';
import type {
AnonymousInitializationMessage,
ConnectionInitializationMessage,
@@ -66,9 +63,7 @@
message: TunnelbrokerClientMessageToDevice,
messageID: ?string,
) => Promise<void>,
- +sendNotif: (
- notif: TunnelbrokerAPNsNotif | TunnelbrokerFCMNotif,
- ) => Promise<void>,
+ +sendNotif: (notif: TunnelbrokerNotif) => Promise<void>,
+sendMessageToTunnelbroker: (payload: string) => Promise<void>,
+addListener: (listener: TunnelbrokerSocketListener) => void,
+removeListener: (listener: TunnelbrokerSocketListener) => void,
diff --git a/lib/types/tunnelbroker/messages.js b/lib/types/tunnelbroker/messages.js
--- a/lib/types/tunnelbroker/messages.js
+++ b/lib/types/tunnelbroker/messages.js
@@ -14,10 +14,7 @@
messageToDeviceValidator,
} from './message-to-device-types.js';
import { type MessageToTunnelbrokerRequest } from './message-to-tunnelbroker-request-types.js';
-import {
- type TunnelbrokerAPNsNotif,
- type TunnelbrokerFCMNotif,
-} from './notif-types.js';
+import { type TunnelbrokerNotif } from './notif-types.js';
import {
type AnonymousInitializationMessage,
type ConnectionInitializationMessage,
@@ -57,8 +54,7 @@
export type DeviceToTunnelbrokerMessage =
| ConnectionInitializationMessage
| AnonymousInitializationMessage
- | TunnelbrokerAPNsNotif
- | TunnelbrokerFCMNotif
+ | TunnelbrokerNotif
| MessageToDeviceRequest
| MessageReceiveConfirmation
| MessageToTunnelbrokerRequest
@@ -69,8 +65,7 @@
// and await sending a message until Tunnelbroker responds that
// the request was processed.
export type DeviceToTunnelbrokerRequest =
- | TunnelbrokerAPNsNotif
- | TunnelbrokerFCMNotif
+ | TunnelbrokerNotif
| MessageToDeviceRequest
| MessageToTunnelbrokerRequest;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Nov 22, 1:50 AM (5 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2559331
Default Alt Text
D12897.id42853.diff (2 KB)
Attached To
Mode
D12897: [lib] Implement sending WebPush notifs using Tunnelbroker
Attached
Detach File
Event Timeline
Log In to Comment