Page MenuHomePhabricator

D12772.diff
No OneTemporary

D12772.diff

diff --git a/lib/tunnelbroker/secondary-tunnelbroker-connection.js b/lib/tunnelbroker/secondary-tunnelbroker-connection.js
--- a/lib/tunnelbroker/secondary-tunnelbroker-connection.js
+++ b/lib/tunnelbroker/secondary-tunnelbroker-connection.js
@@ -2,7 +2,10 @@
import type { MessageToDeviceRequest } from '../types/tunnelbroker/message-to-device-request-types.js';
import type { MessageToTunnelbrokerRequest } from '../types/tunnelbroker/message-to-tunnelbroker-request-types.js';
-import type { TunnelbrokerAPNsNotif } from '../types/tunnelbroker/notif-types.js';
+import type {
+ TunnelbrokerAPNsNotif,
+ TunnelbrokerFCMNotif,
+} from '../types/tunnelbroker/notif-types.js';
type RemoveCallback = () => void;
@@ -12,7 +15,8 @@
message:
| MessageToDeviceRequest
| MessageToTunnelbrokerRequest
- | TunnelbrokerAPNsNotif,
+ | TunnelbrokerAPNsNotif
+ | TunnelbrokerFCMNotif,
) => mixed,
// Active tab receives messages from inactive tabs
+onSendMessage: (
@@ -20,7 +24,8 @@
message:
| MessageToDeviceRequest
| MessageToTunnelbrokerRequest
- | TunnelbrokerAPNsNotif,
+ | TunnelbrokerAPNsNotif
+ | TunnelbrokerFCMNotif,
) => mixed,
) => RemoveCallback,
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
@@ -20,7 +20,10 @@
tunnelbrokerMessageTypes,
tunnelbrokerMessageValidator,
} from '../types/tunnelbroker/messages.js';
-import type { TunnelbrokerAPNsNotif } from '../types/tunnelbroker/notif-types.js';
+import type {
+ TunnelbrokerAPNsNotif,
+ TunnelbrokerFCMNotif,
+} from '../types/tunnelbroker/notif-types.js';
import type {
AnonymousInitializationMessage,
ConnectionInitializationMessage,
@@ -61,7 +64,9 @@
message: TunnelbrokerClientMessageToDevice,
messageID: ?string,
) => Promise<void>,
- +sendNotif: (notif: TunnelbrokerAPNsNotif) => Promise<void>,
+ +sendNotif: (
+ notif: TunnelbrokerAPNsNotif | TunnelbrokerFCMNotif,
+ ) => Promise<void>,
+sendMessageToTunnelbroker: (payload: string) => Promise<void>,
+addListener: (listener: TunnelbrokerSocketListener) => void,
+removeListener: (listener: TunnelbrokerSocketListener) => void,
@@ -316,7 +321,8 @@
request:
| MessageToDeviceRequest
| MessageToTunnelbrokerRequest
- | TunnelbrokerAPNsNotif,
+ | TunnelbrokerAPNsNotif
+ | TunnelbrokerFCMNotif,
) => Promise<void> = React.useCallback(
request => {
return new Promise((resolve, reject) => {

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 25, 9:58 AM (21 h, 18 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2579298
Default Alt Text
D12772.diff (2 KB)

Event Timeline